The difference is 20ns, and if that's enough for you to care about you've got much bigger worries (like "using python").
If nothing else a search/replace for “dict()” to “{}” could yield an aggregate performance bump with basically zero refactoring cost.
Also re Python in general: love it or hate it, it “won” as the language of ML. If you want to use ML libraries you’ll be in python.
Seriously, though, if every Python program in the world was 0.1% faster, that would probably save a lot of energy.
How many minutes / how much energy would it take you to setup a project, run a profiler, do the fix, run tests/CI, commit, release, etc. -vs- how much energy would that 0.1% change save over years?
[1] https://wiki.python.org/moin/PythonSpeed/PerformanceTips
But I hadn't considered the fact that `dict` can be overridden. That was interesting.