[Gambas-user] Wow, Gambas is twice as fast as (Free) Pascal

T Lee Davidson t.lee.davidson at ...626...
Sat Oct 11 02:31:31 CEST 2014


I've been looking at Lazarus lately due to its cross-platform compile 
ability. So...

Just for fun I took the Polynom benchmark program from 
gambaswiki.org/wiki/doc/benchmark and converted it to Free Pascal; then 
compiled it with the Free Pascal Compiler ('fpc').

Much to my surprise, the *pre-compiled* Pascal program ran twice as slow 
as the Gambas program that was compiled on-the-fly:

`time gbs3 -f -c polynom.gambas`
1250000
1250000
1250000
1250000
1250000
1250000
1250000
1250000
1250000
1250000

real    0m17.904s
user    0m9.603s
sys     0m0.052s


Pre-compiled FP executable:
`time ./polynom`
  1.25000000000000E+006
  1.25000000000000E+006
  1.25000000000000E+006
  1.25000000000000E+006
  1.25000000000000E+006
  1.25000000000000E+006
  1.25000000000000E+006
  1.25000000000000E+006
  1.25000000000000E+006
  1.25000000000000E+006

real    0m35.247s
user    0m20.936s
sys     0m0.032s


Maybe it's just me, but I think that's impressive. Go Gambas!

(Now if only we could target Mono ...)

:-)
Lee




More information about the User mailing list