Opened 9 years ago

Closed 9 years ago

#9170 closed Bugs (fixed)

Make boost::addressof use BOOST_FORCEINLINE for better performance

Reported by: Mathias Gaunard Owned by: No-Maintainer
Milestone: To Be Determined Component: utility
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

boost::addressof 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_addressof_forceinline.diff (1.8 KB ) - added by Mathias Gaunard 9 years ago.
patch to add BOOST_FORCEINLINE to critical boost::addressof functions

Download all attachments as: .zip

Change History (2)

by Mathias Gaunard, 9 years ago

patch to add BOOST_FORCEINLINE to critical boost::addressof functions

comment:1 by Joel Falcou, 9 years ago

Resolution: fixed
Status: newclosed

(In [86125]) Fix #9170 - Add BOOST_FORCEINLINE in address_of for performance issues

Note: See TracTickets for help on using tickets.