Hacker News new | past | comments | ask | show | jobs | submit login

The first "benchmark" shows dict() being twice as fast, but the rest of the article concludes "The {} is always faster than dict."



Yes, you're absolutely right. I apologize for this copy-paste mistake. It's fixed now.


I wonder if they swapped the benchmark results somehow. Because on my computer, I get roughly the same times but with {} twice as fast as dict().


Damb am I happy you commented this! I saw the same, checked it twice, and a final time before posting. But then the results were suddenly as expected (dict() being slower). At least I am not going mad, he must have changed it just now.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: