News for hackers. Stuff that matters.
Re:Under the hood of C++ lambdas and std::function by raphaelj on Monday March 28, 2016 @06:15AM (#11373473)
Don't forget about the templates too.

A generic collection is usually faster when implemented using templates instead of void*.

Re:Under the hood of C++ lambdas and std::function by jakub_h on Monday March 28, 2016 @07:03AM (#11373584)
Unless you use a DataDraw-like approach, I presume. I can't see templates doing similar amounts of data rearrangements.
Re:Under the hood of C++ lambdas and std::function by Kristine1975 on Monday March 28, 2016 @07:28AM (#11373638)
Re:Under the hood of C++ lambdas and std::function by jakub_h on Monday March 28, 2016 @07:44AM (#11373688)
Setting aside the cringe I experience whenever supposed principles of "OOP" are mentioned by the author, that page painfully reminds me of the that old joke about bolting four extra legs onto a dog... Furthermore, both a broader comparison (for more complex data and processing) and the technique I mentioned seems to be absent. However, I suppose it shows how to reclaim at least some benefits of better data arrangement even if the language isn't a good fit.
Re:Under the hood of C++ lambdas and std::function by Rexxar on Monday March 28, 2016 @07:46AM (#11373693)
Did you speak of this "datadraw.sourceforge.net" ? It's the first time I heard of it. Have you used it ?
Re:Under the hood of C++ lambdas and std::function by jakub_h on Monday March 28, 2016 @08:03AM (#11373751)
For a number of reasons, I'm not particularly fond of this specific implementation but I'm seriously considering porting its principles into something else (where they might work even better).