As you might (or might not) remember, I asked questions (a very long time ago) about quality of generated code from a few different C compilers (and eventually the same code in Fortran). I rewote inner loops to hand optimize the compilation, and then recoded as SSE2. Finally, in a late night fit of sleeplessness, I rewrote the SSE2 as AVX to see what happens. I can’t exactly draw valid conclusions of these tests, but they were fun exercises.
And its actually not so bad to program in.
But back to the performance.
I rewrote rzf.c to rzf.js. If you want to run this you’ll need to run
npm install posix-getopt npm install printf
and yes, I was being lazy with the conversion, printf almost works the way C’s does. I can clean up the code some what, but, this is a quick and dirty test, so don’t yell at me over the out=printf(…);console.log(out); sillyness.
Running the original rzf.c compiled with gcc
landman@pegasus:~/work/benchmarking/rzftest$ make -f Makefile.rzf-gcc gcc -O3 -I. -Bstatic -c rzf.c gcc -O3 -Bstatic -o rzf-gcc.exe rzf.o -lm gcc -dA -dp -S -O3 -I. -Bstatic -c rzf.c -o rzf-gcc.s
I got this: