4 ms·
I have an old sun with their old compiler powered off in my home, I could check it out. What is the complaint though? Bad realloc strategy? Come to think of i
by asveikau 7y ago
I have an old sun with their old compiler powered off in my home, I could check it out.
What is the complaint though? Bad realloc strategy?
Come to think of it, the worst part of how vectors historically have been was not vector itself, but the requirement to use the copy constructor at reallocation time. C++11 and move semantics fixed that.
- petschge 7y agoThat was a decade ago and I don't remember. My main point was: Yes it is good to have a standard implementation that comes shipped with C++, but that does not mean you can not do better for your special case. And it might be possible with surprisingly little code.
- gpderetta 7y agoIt took a lot of time for most C++ compilers to get good at removing abstraction. It was so bad that Stepanov wrote the abstraction penality benchmark to name and shame compilers. In particular vectors with class type iterators (as opposed to using raw pointers) paid an heavy penality. Is it possible that your vector used raw pointers as iterators?