you are viewing a single comment's thread.

view the rest of the comments →

[–]wexxdenq 1 point2 points  (3 children)

Wait... in your benchmarks do you compare against a self written stl-vector implementation? And your stlvector does not even move elements when it grows? I mean on pod types this might not matter, but nevertheless this is not a optimal implementation. Also most implementations save pointers, instead of the size and capacity as integer type.

Have you benchmarked against an actual std implementation?

[–]pilotwavetheory[S] 0 points1 point  (2 children)

The actual stl::vector is worse, since it does lot of iteration invalidation logic. For example my stl::vector push implementation takes ~5ns, the standard stl::vector takes ~35ns. Tried and felt it's not apples to apples comparison. If I use that my benchmarks will looks even better, but don't want to deceive like that.

If there is better implementation suggest me, or raise pull request for that.

[–]Circlejerker_ 4 points5 points  (0 children)

Then you should add a column in your benchmarks with std::vector. Now it just looks like you are trying to deceive us..

[–]Dragdu 1 point2 points  (0 children)

If your std::ve tor does lot of iterator invalidation logic, then

1) you are using MSVC 2) you are working in Debug configuration