Commit Graph

4 Commits

Author SHA1 Message Date
AnotherTest
a6e4482080 AK+Everywhere: Make StdLibExtras templates less wrapper-y
This commit makes the user-facing StdLibExtras templates and utilities
arguably more nice-looking by removing the need to reach into the
wrapper structs generated by them to get the value/type needed.
The C++ standard library had to invent `_v` and `_t` variants (likely
because of backwards compat), but we don't need to cater to any codebase
except our own, so might as well have good things for free. :^)
2021-04-10 21:01:31 +02:00
Mart G
9068398f6b AK: Make single pivot quick_sort guarantee a max stack depth of log(n)
- The change to quick_sort requires SimpleIterator to support
  assignment.
- Rename quick_sort to single_pivot_quick_sort to make it easier
  to choose a specific implementation (not based on signature).
- Ensure single_pivot_quick_sort does not copy the pivots
- Expand sorts_without_copy test case to cover both single and dual
  pivot implementations.
2021-02-01 09:52:36 +01:00
Andreas Kling
a5982f8605 AK: Mark SimpleIterator::operator*() as ALWAYS_INLINE
This gives the compiler enough information to optimize index validation
when using range-for to iterate over a Vector, drastically reducing the
cost of such loops.
2020-11-14 17:20:17 +01:00
asynts
1b3ecb01a5 AK: Add generic SimpleIterator class to replace VectorIterator. 2020-09-08 14:01:21 +02:00