Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
badger: clean up empty results lists before running them through the …
…merger. this didn't make much difference but I'll leave some benchmarks here just because I forgot to do this after the big badger rewrite. this was immediately after the badger rewrite: goos: linux goarch: amd64 pkg: github.com/fiatjaf/eventstore/test cpu: AMD Ryzen 3 3200G with Radeon Vega Graphics BenchmarkDBs/badger/filter/q-0-4 500 1227 ns/op 2447 B/op 31 allocs/op BenchmarkDBs/badger/filter/q-1-4 500 1506 ns/op 3371 B/op 41 allocs/op BenchmarkDBs/badger/filter/q-2-4 500 2212 ns/op 4323 B/op 56 allocs/op BenchmarkDBs/badger/filter/q-3-4 500 729.1 ns/op 1769 B/op 20 allocs/op BenchmarkDBs/badger/filter/q-4-4 500 827.5 ns/op 1737 B/op 19 allocs/op BenchmarkDBs/badger/filter/q-5-4 500 1215 ns/op 1799 B/op 21 allocs/op BenchmarkDBs/badger/filter/q-6-4 500 1661 ns/op 2923 B/op 34 allocs/op BenchmarkDBs/badger/filter/q-7-4 500 1152 ns/op 2166 B/op 26 allocs/op BenchmarkDBs/badger/filter/q-8-4 500 4425 ns/op 8320 B/op 129 allocs/op BenchmarkDBs/badger/filter/q-9-4 500 5429 ns/op 8273 B/op 126 allocs/op BenchmarkDBs/badger/filter/q-10-4 500 5006 ns/op 3729 B/op 68 allocs/op BenchmarkDBs/badger/filter/q-11-4 500 4833 ns/op 8313 B/op 134 allocs/op BenchmarkDBs/badger/insert-4 500 3541 ns/op 999 B/op 20 allocs/op and this is now after this commit (yes, it's basically the same): goos: linux goarch: amd64 pkg: github.com/fiatjaf/eventstore/test cpu: AMD Ryzen 3 3200G with Radeon Vega Graphics BenchmarkDBs/badger/filter/q-0-4 500 939.8 ns/op 1989 B/op 26 allocs/op BenchmarkDBs/badger/filter/q-1-4 500 2108 ns/op 4332 B/op 53 allocs/op BenchmarkDBs/badger/filter/q-2-4 500 2472 ns/op 4297 B/op 56 allocs/op BenchmarkDBs/badger/filter/q-3-4 500 722.8 ns/op 1716 B/op 20 allocs/op BenchmarkDBs/badger/filter/q-4-4 500 786.7 ns/op 1805 B/op 20 allocs/op BenchmarkDBs/badger/filter/q-5-4 500 1108 ns/op 2286 B/op 27 allocs/op BenchmarkDBs/badger/filter/q-6-4 500 1044 ns/op 2579 B/op 30 allocs/op BenchmarkDBs/badger/filter/q-7-4 500 991.6 ns/op 2296 B/op 27 allocs/op BenchmarkDBs/badger/filter/q-8-4 500 4514 ns/op 9067 B/op 135 allocs/op BenchmarkDBs/badger/filter/q-9-4 500 5294 ns/op 9364 B/op 139 allocs/op BenchmarkDBs/badger/filter/q-10-4 500 4806 ns/op 6819 B/op 112 allocs/op BenchmarkDBs/badger/filter/q-11-4 500 4956 ns/op 7828 B/op 127 allocs/op BenchmarkDBs/badger/insert-4 500 3500 ns/op 1160 B/op 20 allocs/op
- Loading branch information