1) GCC gens better code than any x86 C compiler excluding Intel's one (and hey, i know a bit of x86 asm and optimizations ;)
2) comparing a 3 months old project, made by 1 person, against the genius that work/worked writing GCC is not that fair.
3) the codes aren't exactly the same, i just changed the FB one to ..
Code:
tmp = cint((red+grn+blu) * 0.33)
red = cint((red+grn+tmp) * 0.33)
grn = cint((grn+blu+tmp) * 0.33)
blu = cint((blu+red+tmp) * 0.33)
.. and the average FPS that was 36 on Rel's original and 23 on the slowest parts jumped to 73 at the fastest, and 46 at the slower parts.. twice as fast.
INT() does truncation, what is a slow operation that needs a function call and FPU control word changes, what is reaaaally slow. CINT() is done with a single instruction.
A Floating-point division is way too slower than a multiplication by a reciprocal, as Rel was doing in the C version.
Stills, GCC will beat FB and ANY commercial BASIC compiler easily, coz first: it's a C compiler, and second, it's an optimizing one - i don't know any optimizing BASIC compiler, probably not worth taking into account all the behind-the-curtains things that a BAS compiler has to do.