http://d.puremagic.com/issues/show_bug.cgi?id=9243


[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]


--- Comment #1 from [email protected] 2012-12-29 17:59:58 PST ---
(In reply to comment #0)
> but this enhancement has zero cost, so why not?

Advanced compilers do two things:
- If in a function you have nested scopes that define variables, two successive
scopes are sometimes allowed to re-use the same stack space inside the same
stack frame. I think this can "shuffle" (change) the position of variables in
the stack frame.
- I think they sometimes use profile-driven optimization to tell what are the
hottest stack variables used in a stack frame. This information is probably
later used to set the position of the variables in the stack frame to put the
hottest closer, or on the contrary to let them go different CPU cache lines, to
avoid a slower modify-and-read access patterns.

So maybe it's better to use this idea only in debug builds.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to