Why not have threelevel of DBG 0 = DBG off 1 = as now 2 = -O2 with debug on.
and release build should change from -Oz to -O3 to gain more speed. the size is not a issue make it faster. if the exe file are large or smaller- the large one can be faster that the small one.
That is what I think
----- Original Message ----- From: "Ge van Geldorp" gvg@reactos.org To: "'ReactOS Development List'" ros-dev@reactos.org Sent: den 4 January 2006 09:35 Subject: RE: [ros-dev] Optimization Proposal
- -O2 means easier debugging. This point is really important
because until I realized how true it was, I didn't want to bring this up. Here is a pseudo(but real) disassembly of something I've seen in my dbg = 1 kernel binary while debugging:
... Lots of code
This is how it looks with -O2
... Far less code
I hope we can all agree on which one of these is readable.
For me the most readable is the source form, not the disassembly.
Compiling
with optimization turned on means the correspondence between source and object forms is often broken, making tracing hard. Local variables are
often
kept in registers instead of on the stack and are much harder to inspect.
Since I seem to be just about the only one using a source-level debugger
(I
really cannot understand how the rest of you can live without it, but
that's
just my opinion <g>) I don't want to block the switch to -O2, but please create an easy way to switch it off.
GvG
Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev