News for hackers. Stuff that matters.
Re:Coding Horror: Hardware is Cheap, Programmers are Expensive by zandorg on Friday December 19, 2008 @07:27PM (#404041)
I practise the 'path' method of speed optimisation: If you can not execute a piece of heavy code every 10 in 100 runs, you save a lot, just by a simple data/value check before it.

As for memory opts, pass by reference instead of value (in C++).

I've sped up code by a factor of hundreds by doing some crazy stuff (without going to assembly).

Re:Coding Horror: Hardware is Cheap, Programmers are Expensive by gaius on Saturday December 20, 2008 @06:31AM (#404488)
Yep, memoization is often a big win, and so easy to do in Python with a decorator.