commit | 3e31faf76709ce9732de039228ed086471e0807a | [log] [tgz] |
---|---|---|
author | Lalit Maganti <lalitm@google.com> | Thu May 23 18:04:23 2024 +0100 |
committer | Lalit Maganti <lalitm@google.com> | Thu May 23 18:04:23 2024 +0100 |
tree | 55e450b8c5ae5cb0b8ab69ebd8289cf0b457fbbd | |
parent | e7d642a71ef935b454e52016e8535865e1eef944 [diff] |
tp: rewrite OrderedIndexSearch to be truly O(logn) This CL changes the implementation of OrderedIndexSearch to do a binary search direclty at the top level instead of passing the indices down. This is because translating all the indices is O(n) wheras we only need O(logn) indices to be translated. This *significantly* improves the performance of queries which happen to end up sorting on a nullable/selector column. We also remove a bunch of quite complex code which is no longer necessary. Before: ``` BM_QEFilterNullOrderedArrangement 112494 ns 112488 ns 6115 s/out=57.6271ns s/row=3.06658ns ``` After: ``` BM_QEFilterNullOrderedArrangement 172 ns 172 ns 4114198 s/out=87.8902ps s/row=4.677ps ``` Change-Id: I34499034b720dfeb3250006e308c3e851078f5e2
Perfetto is a production-grade open-source stack for performance instrumentation and trace analysis. It offers services and libraries and for recording system-level and app-level traces, native + java heap profiling, a library for analyzing traces using SQL and a web-based UI to visualize and explore multi-GB traces.
See https://perfetto.dev/docs or the /docs/ directory for documentation.