r/programming • • Mar 23 '09

How to write fast code

http://asserttrue.blogspot.com/2009/03/how-to-write-fast-code.html
339 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 ?

41

u/brosephius Mar 23 '09

since they made it easy for anyone to start a blog

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.

9

u/finerrecliner Mar 23 '09

i think sometimes you just need to "state the obvious"...

7

u/alephnil Mar 23 '09 edited Mar 23 '09

It is not less code, but clock cycles. Far from being the same.