I decided to try an test this, so I can up with a program. The result is that your right, your method seems about 2x quicker. I wrote your algorithm in c along with my algorithm in c and in asm. I couldn't get my asm code faster than the speed of c implementation, so I didn't bother writing your algorithm in asm. Also, yours was the fastest overall even when written only in c.
Here are the results:
$ gcc -o comp comp.c #gh $ ./comp compute_fib Time measured: 1.312 seconds. compute_fib_table Time measured: 1.450 seconds. compute_fib_asm Time measured: 1.704 seconds. $ gcc -O3 -o comp comp.c #gh $ ./comp compute_fib Time measured: 1.314 seconds. compute_fib_table Time measured: 0.696 seconds. compute_fib_asm Time measured: 1.723 seconds.
Here is the code if you want. Don't expect much, it's the first time I used gcc inline assembly: https://pastebin.com/1VEjESdG
Sorry about getting angry before, I was in a rush and in a bad mood due to other things.
Dude. You are fabulous.
Super rare to talk with someone who is committed to a position, but can still listen.
Rarer still is someone that will go off and try the experiment to see for themselves. Very, very admirable.
Part of our communication problem, (and probably your frustration w the convo) was that I wasn't clear initially in explaining why it would be faster. My bad there. I was responding piecemeal.
Very cool that you went off and tried it.
(I have used that technique professionally to resurrect large, non performing systems that have outgrown their platforms...it's super effective... Now u can do that too ;-) )
I checked out your sub for resurrecting Dissenter...also very admirable. I will look at it when I get some time; I'll message u if I come up with anything helpful.
I enjoyed the conversation!
Cheers!
Thanks, I learned a lot. I always wanted to get my feet wet with asm on modern systems.
If you have any suggestion about Captain Dirgo, please let me know. I truly open as far as what direction it should take. My vision for it is just a vague replacement for Dissenter that can't be easily shutdown.
Looking at your code now....super cool.
(post is archived)