Well improving the performance of my algo has been a success. My benchmark used to run in 16.7 minutes, and now it runs in 1.75 minutes. This is single threaded for both so havent even touched multithreading improvements which should be doable as well.

@freemo nice. optimization in Python is often weird. a lot of it for me is reducing unexpectedly costly attribute access. still occasionally find weird issues like a 'not in' being 50% slower than an 'in'

Follow

@freemo i should say, that's for a hash set. so the cost of the 'not' should be the only diff

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.