Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: new traversal method of planNodes in wrapPlan
`wrapPlan` now traverses the `planNode` tree with a recursive function that uses the `Input` and `InputCount` methods instead of the `planVisitor`. This reduces the overhead of traversal. Below are some benchmarks that show the improvement. ``` name old time/op new time/op delta EndToEnd/kv-read/vectorize=on/Simple-16 213µs ± 1% 205µs ± 1% -4.02% (p=0.000 n=20+20) EndToEnd/kv-read/vectorize=off/Simple-16 207µs ± 1% 199µs ± 1% -3.85% (p=0.000 n=19+20) EndToEnd/kv-read/vectorize=on/Prepared-16 146µs ± 1% 141µs ± 1% -2.98% (p=0.000 n=19+19) EndToEnd/kv-read/vectorize=off/Prepared-16 140µs ± 1% 136µs ± 1% -2.94% (p=0.000 n=20+18) name old alloc/op new alloc/op delta EndToEnd/kv-read/vectorize=on/Prepared-16 20.7kB ± 0% 20.6kB ± 0% -0.23% (p=0.000 n=19+19) EndToEnd/kv-read/vectorize=on/Simple-16 33.4kB ± 0% 33.4kB ± 0% ~ (p=0.670 n=19+19) EndToEnd/kv-read/vectorize=off/Simple-16 33.8kB ± 0% 33.7kB ± 0% ~ (p=0.760 n=18+18) EndToEnd/kv-read/vectorize=off/Prepared-16 21.9kB ± 0% 21.9kB ± 0% ~ (p=0.365 n=18+20) name old allocs/op new allocs/op delta EndToEnd/kv-read/vectorize=on/Simple-16 283 ± 0% 282 ± 0% ~ (p=0.105 n=20+20) EndToEnd/kv-read/vectorize=on/Prepared-16 190 ± 0% 189 ± 0% ~ (p=0.150 n=19+20) EndToEnd/kv-read/vectorize=off/Simple-16 270 ± 0% 270 ± 0% ~ (all equal) EndToEnd/kv-read/vectorize=off/Prepared-16 182 ± 0% 182 ± 0% ~ (p=0.447 n=18+20) ``` Release note: None
- Loading branch information