This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: minor C++ front end compile speed improvement


Matt Austern wrote:

No. The "if" was already there. All I'm doing is adding an else clause, so that we don't use this macro in cases where we know for a fact it will do nothing.

What this patch is doing is avoiding looking inside the global namespace's NAMESPACE_DECL node, and thereby avoiding a potential cache line fill. I had a similar experience when I tried to remove the special checks for access_{public,private,protected} nodes (such as 't == access_public_node'), by looking at the actual access value of the node (it is an INT_CST). Doing that caused a slow down, even though it removed a set of conditional branches. I surmised it was a cache filling issue.

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]