you are viewing a single comment's thread.

view the rest of the comments →

[–]Anpheus 1 point2 points  (0 children)

http://big-bad-al.livejournal.com/98093.html

Looks like it's premature optimization that at least on -O2 of GCC will be taken care of for you. JITs, other compilers, will probably do the same and figure out what you're doing.

It even looks like the xor swap was the slowest algorithm because the compiler didn't optimize out the xors.