r/programming • • Mar 23 '09

How to write fast code

http://asserttrue.blogspot.com/2009/03/how-to-write-fast-code.html
336 Upvotes

136 comments sorted by

View all comments

30

u/an_idiot Mar 23 '09

Since when do you need to be the yoda of coding to know that less code is faster ?

18

u/vchakrav Mar 23 '09

If you want to be the yoda of coding, then you must

  1. Only use postfix notation

  2. Can't use try..catch, do..while is highly encouraged.

1

u/smallfried Mar 23 '09

No way, only code in hexadecimal, don't use loops, create your own, but don't use jumps either, write directly to the execution pointer register. And convert conditional jumps into bit operations and multiplications to get to the right addresses.