Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
pphysch
on Jan 22, 2024
|
parent
|
context
|
favorite
| on:
Performance Analysis of Python's Dict() and {}
The first "benchmark" shows dict() being twice as fast, but the rest of the article concludes "The {} is always faster than dict."
nathiss
on Jan 22, 2024
|
next
[–]
Yes, you're absolutely right. I apologize for this copy-paste mistake. It's fixed now.
michaelhoffman
on Jan 22, 2024
|
prev
|
next
[–]
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().
Epa095
on Jan 22, 2024
|
prev
[–]
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: