[fpc-pascal] Optimization levels

Francisco Reyes lists at stringsutils.com
Tue Jun 5 03:49:57 CEST 2007


Looking at the compiler parameters I see:

-Og        generate smaller code
-OG        generate faster code (default)

Is the difference in speed/size significant?

-O1        level 1 optimizations (quick optimizations)
-O2        level 2 optimizations (-O1 + slower optimizations)
-O3        level 3 optimizations (-O2 repeatedly, max 5 times)

Is it safe to use any of those?
When, if at all, it could be a bad idea to use them? 

-Op<x>     target processor:
-Op1       set target processor to 386/486
-Op2       set target processor to Pentium/PentiumMMX (tm)
-Op3       set target processor to PPro/PII/c6x86/K6 (tm)
-Op4       set target processor to Pentium 4 (tm)
-Op5       set target processor to Pentium M (tm)

Which of those would be 586 and 686 type CPUs?
Specially AMD cpus.

Like.
CPU: AMD Duron(tm) Processor (902.05-MHz 686-class CPU)



More information about the fpc-pascal mailing list