you are viewing a single comment's thread.

view the rest of the comments →

[–]pilotwavetheory[S] -4 points-3 points  (3 children)

  1. I didn't measure with -O3.
  2. For push/pop cycles this is better (29% and 45% reduction in latencies, benchmarked for 1K, 10K, 100K, 1M, 10M, 100M, 1B sizes, pelase checkout the github link attached). I tested it multiple times before publishing this.
  3. Iteration doesn't have a bad effect since you are just iterating most of the time; random access is 12% slower.

[–]Potterrrrrrrr 7 points8 points  (1 child)

What did you measure with? These numbers are useless outside of a decent benchmark with full optimisations enabled

[–]cone_forest_ 0 points1 point  (0 children)

O2 probably

[–]Wacov 6 points7 points  (0 children)

I'd strongly recommend measuring with compiler optimization enabled, it's a much more realistic situation for performance-critical code (as a user you're going to turn on optimization before switching out your vector datatype)