top | item 9826511

(no title)

fsk | 10 years ago

What compiler settings were you using? In my experience, C is faster than Java if you turn on full optimization settings.

discuss

order

bite_victim|10 years ago

Now that is just ridiculous! With O2 and O3 I get 0.03 seconds on average! I try to understand what could possibly mean all of the flags that get switched on with optimizations from this page: https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html

I also wonder if Java has any kind of optimizations to experiment with.

fsk|10 years ago

If you don't put in ANY optimization flags, it puts in full debugging info, which slows things down a lot.

I don't know anything about Java optimization.