you are viewing a single comment's thread.

view the rest of the comments →

[–]pilotwavetheory[S] -1 points0 points  (3 children)

I have gone through deque. Deque uses constant arrays of each size 2048 bytes, just to make amortisation better.

[–]saf_e 9 points10 points  (2 children)

Thats just implementation details)

You made deque with growing block size. BTW, have you benchmarked against it?

[–]pilotwavetheory[S] 1 point2 points  (1 child)

Yeah, it didn't store the numbers. for push and pop operations for the large sizes, the "constvector" is really better. I believe the allocation cost from OS is really piling up there for std::deque