Re: [Boost-bugs] [Boost C++ Libraries] #5735: proto should force functions to be inline

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5735: proto should force functions to be inline
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-07-26 23:05:52


#5735: proto should force functions to be inline
-------------------------------+--------------------------------------------
  Reporter: mgaunard | Owner: eric_niebler
      Type: Feature Requests | Status: closed
 Milestone: To Be Determined | Component: proto
   Version: Boost 1.47.0 | Severity: Problem
Resolution: invalid | Keywords:
-------------------------------+--------------------------------------------
Changes (by mgaunard):

  * type: Bugs => Feature Requests

Comment:

 Yes, that paper is "not terribly good", yet it has a couple of wise things
 in it, and the conclusion is interesting, which is why I put it there.
 (it's from Thomas Heller's advisor, by the way)\\
 I unfortunately don't have more information on how they got those results.

 I haven't personally run into problems with inlining and Boost.Proto,
 since I haven't done things that were very performance critical with it
 yet that required me to look at the produced asm, but I have run into
 issues in NT2 (in the non-ET parts) where some very small and trivial
 functions didn't get inlined on some GCC versions or settings, which was
 catastrophic to performance (hundreds of times slower).\\
 Some other NT2 users ran into similar problems on MSVC, albeit on
 different functions.

 I believe putting force inline attributes to functions is an even more
 reliable solution than making code "compiler-friendly", since this way we
 can have a guarantee that things will be inlined rather than analyzing asm
 and finding out a workaround on a case by case basis.

 I'm only suggesting that a BOOST_PROTO_FORCE_INLINE be put instead of
 inline in the cases where it appears to be a good idea. Is that considered
 to be too intrusive in the source code?

 In any case I'll get Joel in the loop.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5735#comment:4>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:07 UTC