Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have a book on the shelf called "High Performance Python".

Seriously, though, if every Python program in the world was 0.1% faster, that would probably save a lot of energy.



Bring globals into local scope, never use '.' in tight loops, avoid function calls, etc [1], sure make ugly python code. But, wow, it really can make a difference.

[1] https://wiki.python.org/moin/PythonSpeed/PerformanceTips


I'm not sure how many of those are valid any more.


You have to compare that to the amount of energy spent while making it 0.1% faster. On average, I'm not sure we'd be saving any energy. The one bit that would get any remotely relevant gain would be offset by lots of tools where that improvement happens once a week.

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?




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

Search: