1

I've read in the manpage that

Note: GCC options -Ox, -fx and -mx are ignored.

It produces different binary sizes, compiling st with gcc -O3, the binary size is 120K and with tcc it's 112K.

Is code compiled with tcc running slower than gcc -O3?

Soft Waffle
  • 356
  • 1
  • 12

1 Answers1

4

Tcc does not optimise. Normally, gcc's optimisations result in binaries which run considerably faster. (The size of the binary is not a predictor of execution speed, by the way.)

rici
  • 234,347
  • 28
  • 237
  • 341
  • Are there any other fast, small c compilers that have the option to optimise? – Soft Waffle May 12 '20 at 12:57
  • @paul: Probably not. Optimisation is a big complicated problem. A compiler is either small and fast and produces unoptimised code, or it's big and slow, and produces better code. – rici May 12 '20 at 13:09