Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#9169 closed Bugs (fixed)

Make Boost.Ref use BOOST_FORCEINLINE for better performance

Reported by: Mathias Gaunard Owned by: Peter Dimov
Milestone: To Be Determined Component: bind
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

boost::ref is used a lot to build expression templates or function objects which typically need to be inlined to get decent performance.

Using BOOST_FORCEINLINE ensures that it does get inlined, even when minimal inlining options are used.

It is very important to do this to get acceptable performance in debug for some the of the libraries I work on, like Boost.SIMD or NT².

See the attached patch.

Attachments (1)

boost_ref_forceinline.diff (2.3 KB ) - added by Mathias Gaunard 9 years ago.
patch to add BOOST_FORCEINLINE to critical boost::ref functions

Download all attachments as: .zip

Change History (3)

by Mathias Gaunard, 9 years ago

Attachment: boost_ref_forceinline.diff added

patch to add BOOST_FORCEINLINE to critical boost::ref functions

comment:1 by Joel Falcou, 9 years ago

Resolution: fixed
Status: newclosed

(In [86124]) Fix #9169 - Add BOOST_FORCEINLINE on boost::ref for performance issue

comment:2 by Peter Dimov, 9 years ago

I tend to only close tickets when the fixes are in the release branch in addition to trunk, because this helps me remember to merge.

Note: See TracTickets for help on using tickets.