Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Why don't you code in assembly?

Name: Anonymous 2012-12-30 1:55

 

Name: Anonymous 2012-12-30 17:49

>>13
It was a very short routine. The naive recursive fibs function. I got my implementation pretty tight and I was using eax to pass the n function parameter, but it still wasn't faster than gcc. After looking at gcc's output, I saw that it had inlined the recursive calls by several layers, and used the other registers within the main body. I could have done the same thing, but I don't know, it would have felt like I was going to far. When you start with an optimal algorithm it isn't hard to streamline it in assembly by hand. But it seems with suboptimal code, symbolic manipulation at the higher level can improve the algorithm.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List