[PATCH] D38433: Introduce a specialized data structure to be used in a subsequent change
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 9 17:10:57 PDT 2017
sanjoy added a comment.
In https://reviews.llvm.org/D38433#892625, @dblaikie wrote:
> Looks a fair bit like std::deque - what're the tradeoffs between the two?
I don't think this is like a `std::deque` -- it allows insertion only in one direction. It is probably most similar to `std::forward_list<std::array<T, N>>`, and frankly I'm not sure if I've gone overboard with implementing a new data structure from scratch. However:
- Most of the logic is in iteration and figuring out when to add a new chunk to the linked list. This would still remain with `std::forward_list<std::array<T, N>>`.
- I'd be less comfortable playing the pointer-offsetting tricks I've used to keep the data structure two words long if I were using `std::forward_list`.
https://reviews.llvm.org/D38433
More information about the llvm-commits
mailing list