After profiling `SortLimitVaryConstant`, I found a few easy improvements that can be done to speed up queries of this shape. First, rather than using `strlen`, use a bespoke SWAR method to speed up string length calculations. Then, inline some often-used functions in the hot path. SimpleMemoryUsageTracker::set() and SorterStats::memUsage() can be made inline.
Complete low-hanging fruit optimizations for sort_limit codepath
ExportXML Word Printable JSON
- Assignee:
-
Kyle Burgess
- Reporter:
-
Kyle Burgess
- Votes:
-
0 Vote for this issue - Watchers:
-
2 Start watching this issue
- Created:
- Updated:
- Resolved: