by bigbillheck · 2y ago · 0 comments
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.
[1] https://wiki.python.org/moin/PythonSpeed/PerformanceTips
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?
But I hadn't considered the fact that `dict` can be overridden. That was interesting.