Skip to contentSkip to conversation

When to use optimization ?

DISCUSSION Jad Saklawi 2 participants 2 messages Dec 1, 2003

lore
Share & tools
lore
#0 lore raw

Hello guys,
When to use optimization in gcc (for example when i have loops, heavy IO, ???) and what is the difference between the optimization levels.

Greets, Jad

Signature · 7 lines
Jad Saklawi
Lebanese American University
P.O.Box : 13-5053/492
Chouran Beirut : 1102 2801
Phone : 009613 98 98 75
http://Saklawi.info
Lebanon
#1 lore raw
Quoted 2 lines · Jad Saklawi

When to use optimization in gcc (for example when i have loops, heavy IO, ???)

Use optimisation for building "production" binaries (i.e. those which are simply meant to be run by a user). Don't use optimisation when building binaries which you wish to debug with e.g. gdb.

Quoted 1 line

and what is the difference between the optimization levels.

The "Optimize Options" section in the "gcc" Info file documents exactly which optimisations are enabled by the different levels.

Signature · 1 line
Glynn Clements <[email protected]>