Re:Why should I have written ZeroMQ in C, not C++ (part II)
by tptacek on Thursday August 30, 2012 @01:38PM
(#4455760)
Sure, but also remember that while vectors are better at locality, both vectors and lists can trash the heap; both are making variable sized requests on demand from the allocator.
[ Parent
| on HN ]
Re:Why should I have written ZeroMQ in C, not C++ (part II)
by tedunangst on Thursday August 30, 2012 @01:57PM
(#4455856)
Every time I've had to deal with fragmentation, it was due to a small number of large objects. Never large numbers of small objects. ymmv.
Re:Why should I have written ZeroMQ in C, not C++ (part II)
by scott_s on Thursday August 30, 2012 @07:23PM
(#4457396)
Which is probably thanks to a good memory allocator.
Re:Why should I have written ZeroMQ in C, not C++ (part II)
by tptacek on Thursday August 30, 2012 @02:56PM
(#4456172)
Very definitely not my experience.
Re:Why should I have written ZeroMQ in C, not C++ (part II)
by tedunangst on Thursday August 30, 2012 @03:39PM
(#4456355)
Didn't mean to imply it was always the case. Just a counterpoint to the conventional wisdom that fragmentation is only a problem with lots of tiny objects.