Skip to content
Discussion options

You must be logged in to vote

Wow that implementation in the standard library is kind of insane. Your diagnosis looks correct without me investigating further. I'd suggest a bug report upstream.

I imagine we can avoid calling the __bool__ and __iter__ methods in the meantime by checking the length explicitly or something.

Do you have a simple MRE that we can use to check for a performance improvement?

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@gyula-lakatos
Comment options

@zanieb
Comment options

zanieb Oct 2, 2023
Collaborator

Answer selected by gyula-lakatos
@gyula-lakatos
Comment options

@zanieb
Comment options

zanieb Oct 2, 2023
Collaborator

@gyula-lakatos
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants