Nit-Picky.

Started by
10 comments, last by Taulin 23 years, 11 months ago
Lol, maybe. (Maybe it''s a subconscious job security tactic...) =)
Creativity is a bloody nuisance and an evil curse that will see to it that you die from stress and alcohol abuse at a very early age, that you piss off all your friends, break appointments, show up late, and have this strange bohemian urge (you know that decadent laid-back pimp-style way of life). The truly creative people I know all live lousy lives, never have time to see you, don't take care of themselves properly, have weird tastes in women and behave badly. They don't wash and they eat disgusting stuff, they are mentally unstable and are absolutely brilliant. (k10k)
Advertisement
If you can''t read that, you should NEVER EVER have a look at Perl RegExps :-)

Volker - thanks for the disassembly, it proves me right in saying some people have too much time on their hands! In fact, no difference at all, great stuff.
Could still be the debug build of course.

Some remarks to Taulin - have you ever had Compiler theory?
quote:
In the ''For'' loop example, ++i should always be the choice. A for loop with 100 iterations, and using i++ is creating an i type 100 times. At each iteration, creating another instance. Which do you think is more efficient?

Off the top of my head - it would only create a new i type on the stack if the further execution of the loop required the two variables to be processed separately - which I think cannot be the case with this statement. It simply is a reordering of statements. i++ will decompose into something that uses it''s register, and then increments it, while ++i will first increment the register and then use it.
I don''t think either would take more time than the other in this case.

Most low-level optimisations are taken care of by the compiler (why do you think they are so expensive ;-) ).
Stuff you need to be careful of these days is much more complex, cache flushing, MMX instructions, SIMD... I won''t even try to learn that stuff yet, I''d rather have working code first :-)


#pragma DWIM // Do What I Mean!
~ Mad Keith ~
**I use Software Mode**
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.

This topic is closed to new replies.

Advertisement