24-Aug-2014 16:24, Andrei Alexandrescu пишет:
(Speaking of which: Some, but not all, types in std.container use reference counting. One other great area of improvement would be to guarantee that everything is std.container is reference counted. Containers are the perfect candidate for reference counting - they are typically large enough to make the reference counting overhead negligible by comparison with the typical work on them.)
The rest of post is mostly in line with my reasoning (except for nobody measures stuff, it's just bullshit).
Speaking of data-structures I find just about the opposite. Most data structure are small, which must be the fact so fondly used by C++ vector: small-string optimization. Only very few data-structures are large in a given program, and usually correspond to some global tables and repositories. Others are either short lived byproduct of input processing or are small data-sets attached to some global entity.
-- Dmitry Olshansky