Right. I haven't used 4.3 yet. I googled around and the only other compiler I saw that fixed this was SU's, in my previous post. (if I understood correctly) They fixed it just a few months back.
tx -----Original Message----- From: Paolo Carlini [mailto:[EMAIL PROTECTED] Sent: 08 September 2007 16:38 To: Hicham Mouline Cc: gcc@gcc.gnu.org Subject: Re: g++ std::max() performance Hicham Mouline wrote: >Can anyone else observe this? > > You are observing it on gcc4.2.x or gcc4.1.x, right? Because mainline (would be 4.3.0) is able to optimize both exactly to the same tree. Actually, should be one of the very few compilers around implementing that optimization ;) See PRs tree-optimization/30738 (and 19431). Paolo.