2 ms·
That was my reaction. I mean, let's think about all the overhead the shared_ptr adds: 1) Layer of indirection 2) Non-continuous memory 3) shared_ptr overhea
by Pxtl 12y ago
That was my reaction. I mean, let's think about all the overhead the shared_ptr adds:
1) Layer of indirection
2) Non-continuous memory
3) shared_ptr overhead itself as you mentioned.
All that and only 2x slower? For many applications performance of this particular operation is a rounding error of a rounding error.
This tells me not to worry about optimizing my iterations across datasets prematurely.