Friday, December 01, 2006

Pseud-est piece of code I've seen

 This . piece . of . code . is . GOD.

What does it do ? It calculates 1/sqrt(x). Um, why? Because in any graphics application, one of the most common operations is to normalize a vector. If this peice of code can improve performance by 10%, it will cause a colossal net performance increase, since there are thousands of normalization ops taking place for each frame! Ok, so this is from? The Quake 3 source code !!

Rejoice, my brethren, Real Programmers still walk the Earth !

Update: People, here is absolute proof that Slashdot, too, is God. These comments just made my day !

(x^(1/2))^2 != 1

Interesting smiley... is that a dead man with a fraction in his mouth and a prominent Adam's Apple, wearing a bow tie and a dress and standing on a toy race car?

What's your point, man?

An extremely detailed description on how it works.

"The real genius here is Isaac Newton. 'course, that's not news to anyone."

You mean that Newton thought about taking advantage of the IEEE float format to initialize the algorithm using "i = 0x5f3759df - (i>>1);"? Wow, now that's a clever guy!

What a reply !

I have a truly marvelous proof of who wrote this code which this comment box is too narrow to contain.

ROFLMAO :D !!!!!! lolz even !!!

The linked site seems to be down (gee, you think it might be slashdotted?), but this paper [] seems to be covering the same topic

Do read the paper, might be interesting it is AMAZING! VERY CLEAR! .

6. "It was fast" #17070808 .php?section=ffi&page=sqrt []

And before you know it, someone found a comparative study :P

Aha! A link to HAKMEM !

And finally,

8. #17071866

Look son, crazy people...


No comments: