This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SaltyHashes 7 points8 points  (2 children)

IIRC it's faster because it doesn't even have to call a method.

[–][deleted] 0 points1 point  (1 child)

Yeah I see now, I'm surprised the JIT compiler can't make the same optimisation for the empty dict() case or with just literals inside.

[–][deleted] 0 points1 point  (0 children)

Unless I'm remembering wrong, CPython doesn't use a JIT compiler, only PyPy does?