Le 22/06/2014 15:32, Julien Bect a écrit :
Le 17/06/2014 17:11, Julien Bect a écrit :
I don't much like having to manually match up new/delete, so I'd
rather see that go inside a constructor/destructor pair. Done
properly and with inlining, I don't see why it would be inefficient
and perhaps we could eliminate the BEGIN/END macros?
I try that right now.
John,
As you know, using a constructor/destructor pair is actually what the
BEGIN/END macros currently do. I have tried improving this
constructor/destructor approach with inlining, but couldn't get a
significant improvement in this direction. Perhaps didn't I try hard
enough...
Ok, I have tried harder and finally obtained a (significant ?) speed
improvement using a constructor/destructor pair and templated classes
(see attached patch).