Forum > Unix
[SOLVED] Pascal performance on polynomial benchmark slower than expected
botster:
--- Quote from: Jonas Maebe on October 15, 2014, 09:39:00 pm ---[True, with the caveat "for this particular program".
--- End quote ---
Right. I forgot about that part ;-)
Thank you for the information and clarifications.
And I thank everyone for their assistance. You have all been very helpful. :)
DelphiFreak:
Summary
"""""""""""""
You started with:
real 0m38.576s
user 0m20.965s
sys 0m0.063s
and ended with:
real 0m8.789s
user 0m8.046s
sys 0m0.003s
by changing some compiler options.
World is ok again :-) FPC is faster than Gambas.
Sam
botster:
--- Quote from: DelphiFreak on October 17, 2014, 08:10:18 am ---Summary
"""""""""""""
You started with:
real 0m38.576s
user 0m20.965s
sys 0m0.063s
and ended with:
real 0m8.789s
user 0m8.046s
sys 0m0.003s
by changing some compiler options.
World is ok again :-) FPC is faster than Gambas.
Sam
--- End quote ---
No, Sam, sorry. I started with real: 0m38.576s and got to real: 15.333s by closing my web browser when I ran the tests :-[. I got from 0m15.333s to 0m8.789s by changing some compiler options.
But not to worry, FPC is still faster than Gambas ;-) (But not by much! :P )
:-X
Jonas Maebe:
--- Quote from: botster on October 17, 2014, 09:22:08 am ---But not to worry, FPC is still faster than Gambas ;-) (But not by much! :P )
--- End quote ---
That's to be expected on a program like this, if Gambas uses a good Just-in-Time compiler (which apparently it does). A program containing a single tight loop is the ideal case for Just-in-Time compilers, as you only have a little overhead (compiling a single code fragment once, or maybe twice in case you use incremental optimization) compared to the number of times the code is executed. If you have similar code that can be optimised better in the presence of profiling information, the JiT version can even easily outperform static compilation.
Navigation
[0] Message Index
[*] Previous page