- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
(posting for a friend) Does the C++ compiler have small-object optimization so that, in particular, numeric Complex { double real; double imag; } and Interval {double min; double max;} classes can be passed and returned in registers for functions which are not exported but can't be inlined.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try passing by reference instead of value. Then use dissassembly window to see what the compiler used. Unless your code creats temporary stack values your code should work quite well. Back in the old days withBorland C++ you could define a struct with a null constructor that produced absolutely no code for the constructor. MS C++ for some odd reason inserted a call to an empty subroutine that did nothing but return (what a crock). As for Intel C++ I do not know what it doesas I do not have it. Give it a try and see what happens.
Jim Dempsey
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page