Skip to content

part: Optimizations to List() and LowerBound() - #206

Open
joamaki wants to merge 4 commits into
mainfrom
pr/joamaki/part-optimizations
Open

joamaki wants to merge 4 commits into
mainfrom
pr/joamaki/part-optimizations

Conversation

@joamaki

@joamaki joamaki commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor
  • Increase the reconciler benchmark rate-limit as it's limiting the throughput
  • Avoid string heap allocation in non-unique iterator with unsafe.String (DB_LowerBound_SecondaryIndex 88us => 79us (-10%))
  • Avoid unnecessary part.Txn clone in List() when the index is unique (it's just a 'Get()' call and we don't hold onto the tree) (ListInsert 1409us => 473us (-66%))
  • Reduce allocation in LowerBound() by pre-allocating an edge slice and avoiding unnecessary slice heap allocation for []*header[T]{this} by instead slicing it from the part node's children array. (DB_LowerBound_SecondaryIndex 31 allocs => 28 allocs)
  • Use findIndex instead of sort.Search in lower-bound iteration

AIL:3

@joamaki
joamaki requested a review from bimmlerd September 25, 2026 10:59
@joamaki
joamaki force-pushed the pr/joamaki/part-optimizations branch from db90fda to b73468d Compare September 25, 2026 10:59
@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
$ make
go build ./...
go: downloading github.com/cilium/hive v1.0.4
go: downloading golang.org/x/time v0.15.0
go: downloading go.yaml.in/yaml/v3 v3.0.4
go: downloading github.com/spf13/cobra v1.10.2
go: downloading github.com/spf13/pflag v1.0.10
go: downloading github.com/cilium/stream v0.0.1
go: downloading github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de
go: downloading go.uber.org/dig v1.17.1
go: downloading github.com/spf13/viper v1.18.2
go: downloading golang.org/x/term v0.16.0
go: downloading github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
go: downloading github.com/mitchellh/mapstructure v1.5.0
go: downloading golang.org/x/sys v0.17.0
go: downloading golang.org/x/tools v0.17.0
go: downloading github.com/spf13/cast v1.6.0
go: downloading github.com/fsnotify/fsnotify v1.7.0
go: downloading github.com/sagikazarmark/slog-shim v0.1.0
go: downloading github.com/spf13/afero v1.11.0
go: downloading github.com/subosito/gotenv v1.6.0
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading gopkg.in/ini.v1 v1.67.0
go: downloading github.com/magiconair/properties v1.8.7
go: downloading github.com/pelletier/go-toml/v2 v2.1.0
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading golang.org/x/text v0.14.0
STATEDB_VALIDATE=1 go test ./... -cover -vet=all -test.count 1
go: downloading github.com/stretchr/testify v1.11.1
go: downloading go.uber.org/goleak v1.3.0
go: downloading golang.org/x/exp v0.0.0-20240119083558-1b970713d09a
go: downloading github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
ok  	github.com/cilium/statedb	252.915s	coverage: 79.6% of statements
ok  	github.com/cilium/statedb/index	0.009s	coverage: 48.6% of statements
ok  	github.com/cilium/statedb/internal	0.016s	coverage: 45.2% of statements
ok  	github.com/cilium/statedb/lpm	3.135s	coverage: 76.1% of statements
ok  	github.com/cilium/statedb/part	66.984s	coverage: 86.8% of statements
ok  	github.com/cilium/statedb/reconciler	0.270s	coverage: 93.3% of statements
	github.com/cilium/statedb/reconciler/benchmark		coverage: 0.0% of statements
	github.com/cilium/statedb/reconciler/example		coverage: 0.0% of statements
go test -race ./... -test.count 1
ok  	github.com/cilium/statedb	32.083s
ok  	github.com/cilium/statedb/index	1.013s
ok  	github.com/cilium/statedb/internal	1.026s
ok  	github.com/cilium/statedb/lpm	2.369s
ok  	github.com/cilium/statedb/part	28.535s
ok  	github.com/cilium/statedb/reconciler	1.416s
?   	github.com/cilium/statedb/reconciler/benchmark	[no test files]
?   	github.com/cilium/statedb/reconciler/example	[no test files]
go test ./... -bench . -benchmem -test.run xxx
goos: linux
goarch: amd64
pkg: github.com/cilium/statedb
cpu: AMD EPYC 9V74 80-Core Processor                
BenchmarkDB_WriteTxn_1-4                      	 1215392	       984.2 ns/op	   1016023 objects/sec	     656 B/op	      13 allocs/op
BenchmarkDB_WriteTxn_10-4                     	 3021916	       425.7 ns/op	   2348889 objects/sec	     352 B/op	       6 allocs/op
BenchmarkDB_WriteTxn_100-4                    	 3711042	       325.6 ns/op	   3071083 objects/sec	     317 B/op	       5 allocs/op
BenchmarkDB_WriteTxn_1000-4                   	 3361112	       361.1 ns/op	   2769211 objects/sec	     318 B/op	       5 allocs/op
BenchmarkDB_WriteTxn_100_SecondaryIndex-4     	 2140656	       562.9 ns/op	   1776627 objects/sec	     419 B/op	       7 allocs/op
BenchmarkDB_WriteTxn_CommitOnly_100Tables-4   	 1446618	       828.7 ns/op	    1112 B/op	       4 allocs/op
BenchmarkDB_WriteTxn_CommitOnly_1Table-4      	 2342962	       513.9 ns/op	     224 B/op	       4 allocs/op
BenchmarkDB_NewWriteTxn-4                     	 2695604	       452.9 ns/op	     200 B/op	       3 allocs/op
BenchmarkDB_WriteTxnCommit100-4               	 1479156	       806.7 ns/op	    1096 B/op	       4 allocs/op
BenchmarkDB_NewReadTxn-4                      	723049573	         1.653 ns/op	       0 B/op	       0 allocs/op
BenchmarkDB_Modify-4                          	    3003	    393115 ns/op	   2543783 objects/sec	  342506 B/op	    6073 allocs/op
BenchmarkDB_GetInsert-4                       	    2739	    433873 ns/op	   2304821 objects/sec	  326503 B/op	    6073 allocs/op
BenchmarkDB_ListInsert-4                      	    1880	    579304 ns/op	   1726210 objects/sec	  486538 B/op	   11073 allocs/op
BenchmarkDB_RandomInsert-4                    	    3153	    371156 ns/op	   2694287 objects/sec	  318500 B/op	    5073 allocs/op
BenchmarkDB_RandomReplace-4                   	    1620	    765349 ns/op	   1306594 objects/sec	  432316 B/op	    8089 allocs/op
BenchmarkDB_SequentialInsert-4                	    3388	    358100 ns/op	   2792520 objects/sec	  318499 B/op	    5073 allocs/op
BenchmarkDB_SequentialInsert_Prefix-4         	     721	   1655297 ns/op	    604121 objects/sec	 2794461 B/op	   41797 allocs/op
BenchmarkDB_Changes_Baseline-4                	    2550	    448474 ns/op	   2229782 objects/sec	  388269 B/op	    6164 allocs/op
BenchmarkDB_Changes-4                         	    1430	    830986 ns/op	   1203390 objects/sec	  603984 B/op	    9325 allocs/op
BenchmarkDB_RandomLookup-4                    	   35652	     33850 ns/op	  29542065 objects/sec	       0 B/op	       0 allocs/op
BenchmarkDB_SequentialLookup-4                	   39166	     30396 ns/op	  32899164 objects/sec	       0 B/op	       0 allocs/op
BenchmarkDB_Prefix_SecondaryIndex-4           	   12820	     93129 ns/op	  10737796 objects/sec	  108952 B/op	      26 allocs/op
BenchmarkDB_LowerBound_SecondaryIndex-4       	   12630	     94936 ns/op	  10533382 objects/sec	  109240 B/op	      28 allocs/op
BenchmarkDB_FullIteration_All-4               	    1165	    997822 ns/op	 100218284 objects/sec	     104 B/op	       4 allocs/op
BenchmarkDB_FullIteration_Prefix-4            	    1068	   1109939 ns/op	  90095016 objects/sec	     136 B/op	       5 allocs/op
BenchmarkDB_FullIteration_Get-4               	     315	   3777264 ns/op	  26474186 objects/sec	       0 B/op	       0 allocs/op
BenchmarkDB_FullIteration_Get_Secondary-4     	     142	   8377879 ns/op	  11936196 objects/sec	       0 B/op	       0 allocs/op
BenchmarkDB_FullIteration_ReadTxnGet-4        	     320	   3777175 ns/op	  26474811 objects/sec	       0 B/op	       0 allocs/op
BenchmarkDB_PropagationDelay-4                	 1000000	      1075 ns/op	         9.000 50th_µs	        10.00 90th_µs	        34.00 99th_µs	     808 B/op	      15 allocs/op
BenchmarkDB_WriteTxn_100_LPMIndex-4           	  644661	      1773 ns/op	    564072 objects/sec	    1574 B/op	      35 allocs/op
BenchmarkDB_WriteTxn_1_LPMIndex-4             	  195134	     12843 ns/op	     77861 objects/sec	   14512 B/op	      79 allocs/op
BenchmarkDB_LPMIndex_Get-4                    	     450	   2560537 ns/op	   3905431 objects/sec	       0 B/op	       0 allocs/op
BenchmarkWatchSet_4-4                         	 3092931	       385.4 ns/op	     296 B/op	       4 allocs/op
BenchmarkWatchSet_16-4                        	  933832	      1235 ns/op	    1096 B/op	       5 allocs/op
BenchmarkWatchSet_128-4                       	  110228	     10986 ns/op	    8904 B/op	       5 allocs/op
BenchmarkWatchSet_1024-4                      	    9716	    111754 ns/op	   73743 B/op	       5 allocs/op
PASS
ok  	github.com/cilium/statedb	46.333s
PASS
ok  	github.com/cilium/statedb/index	0.003s
goos: linux
goarch: amd64
pkg: github.com/cilium/statedb/internal
cpu: AMD EPYC 9V74 80-Core Processor                
Benchmark_SortableMutex-4   	 7453884	       162.1 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	github.com/cilium/statedb/internal	1.212s
goos: linux
goarch: amd64
pkg: github.com/cilium/statedb/lpm
cpu: AMD EPYC 9V74 80-Core Processor                
Benchmark_txn_insert/batchSize=1-4         	    2433	    452702 ns/op	   2208957 objects/sec	  822422 B/op	   13975 allocs/op
Benchmark_txn_insert/batchSize=10-4        	    4441	    271170 ns/op	   3687729 objects/sec	  369201 B/op	    6668 allocs/op
Benchmark_txn_insert/batchSize=100-4       	    4797	    253298 ns/op	   3947914 objects/sec	  329619 B/op	    6027 allocs/op
Benchmark_txn_delete/batchSize=1-4         	    2061	    612159 ns/op	   1633562 objects/sec	 1270473 B/op	   13976 allocs/op
Benchmark_txn_delete/batchSize=10-4        	    4422	    276773 ns/op	   3613069 objects/sec	  356418 B/op	    5769 allocs/op
Benchmark_txn_delete/batchSize=100-4       	    4922	    246259 ns/op	   4060768 objects/sec	  270754 B/op	    5038 allocs/op
Benchmark_LPM_Lookup-4                     	   10000	    110759 ns/op	   9028631 objects/sec	       0 B/op	       0 allocs/op
Benchmark_LPM_All-4                        	  166281	      7038 ns/op	 142091800 objects/sec	      32 B/op	       1 allocs/op
Benchmark_LPM_Prefix-4                     	  171738	      7054 ns/op	 141754117 objects/sec	      32 B/op	       1 allocs/op
Benchmark_LPM_LowerBound-4                 	  318350	      3768 ns/op	 132711611 objects/sec	     288 B/op	       2 allocs/op
PASS
ok  	github.com/cilium/statedb/lpm	11.921s
goos: linux
goarch: amd64
pkg: github.com/cilium/statedb/part
cpu: AMD EPYC 9V74 80-Core Processor                
Benchmark_Set_Singleton_Create-4              	28193850	        42.30 ns/op	      24 B/op	       1 allocs/op
Benchmark_Set_Singleton_Has-4                 	132634639	         9.067 ns/op	       0 B/op	       0 allocs/op
Benchmark_StringMap_Txn_Insert-4              	   10000	    103784 ns/op	   9635411 items/sec	   98249 B/op	    1306 allocs/op
Benchmark_Uint64Map_Random-4                  	    2611	    465103 ns/op	   2150061 items/sec	 1322482 B/op	    6041 allocs/op
Benchmark_Uint64Map_Sequential-4              	    2737	    442916 ns/op	   2257762 items/sec	 1703089 B/op	    5753 allocs/op
Benchmark_Uint64Map_Sequential_Insert-4       	    2881	    407338 ns/op	   2454963 items/sec	 1695083 B/op	    4752 allocs/op
Benchmark_Uint64Map_Sequential_Txn_Insert-4   	   14629	     82019 ns/op	  12192285 items/sec	   90464 B/op	    2031 allocs/op
Benchmark_Uint64Map_Random_Insert-4           	    2912	    420038 ns/op	   2380736 items/sec	 1315578 B/op	    5043 allocs/op
Benchmark_Uint64Map_Random_Txn_Insert-4       	    9032	    137969 ns/op	   7248009 items/sec	  117427 B/op	    2411 allocs/op
Benchmark_Insert_RootOnlyWatch-4              	   13832	     86937 ns/op	  11502635 objects/sec	   75552 B/op	    2036 allocs/op
Benchmark_Insert-4                            	   14088	     84848 ns/op	  11785807 objects/sec	   76096 B/op	    2047 allocs/op
Benchmark_WatchReplace-4                      	   16238	     73997 ns/op	  13513986 objects/sec	   57305 B/op	    1006 allocs/op
Benchmark_Modify-4                            	   16921	     71202 ns/op	  14044603 objects/sec	   58056 B/op	    1007 allocs/op
Benchmark_GetInsert-4                         	   13868	     86435 ns/op	  11569450 objects/sec	   58056 B/op	    1007 allocs/op
Benchmark_Replace-4                           	45471871	        26.36 ns/op	  37941437 objects/sec	       0 B/op	       0 allocs/op
Benchmark_Replace_RootOnlyWatch-4             	45566254	        26.44 ns/op	  37816813 objects/sec	       0 B/op	       0 allocs/op
Benchmark_txn_1-4                             	 8604554	       138.4 ns/op	   7225640 objects/sec	      64 B/op	       3 allocs/op
Benchmark_txn_10-4                            	13566714	        83.30 ns/op	  12004105 objects/sec	      76 B/op	       2 allocs/op
Benchmark_txn_100-4                           	15997938	        73.09 ns/op	  13681619 objects/sec	      67 B/op	       2 allocs/op
Benchmark_txn_1000-4                          	13916070	        84.46 ns/op	  11839388 objects/sec	      65 B/op	       2 allocs/op
Benchmark_txn_delete_1-4                      	 7019004	       172.5 ns/op	   5796107 objects/sec	     632 B/op	       3 allocs/op
Benchmark_txn_delete_10-4                     	15328533	        75.39 ns/op	  13264992 objects/sec	     103 B/op	       1 allocs/op
Benchmark_txn_delete_100-4                    	17684506	        66.13 ns/op	  15122111 objects/sec	      35 B/op	       1 allocs/op
Benchmark_txn_delete_1000-4                   	18733069	        63.28 ns/op	  15802104 objects/sec	      28 B/op	       1 allocs/op
Benchmark_Get-4                               	   78722	     15210 ns/op	  65747515 objects/sec	       0 B/op	       0 allocs/op
Benchmark_GetWatch-4                          	   59671	     20043 ns/op	  49893151 objects/sec	       0 B/op	       0 allocs/op
Benchmark_All-4                               	  187018	      6399 ns/op	 156282910 objects/sec	       0 B/op	       0 allocs/op
Benchmark_Iterator_All-4                      	  179014	      6675 ns/op	 149819821 objects/sec	       0 B/op	       0 allocs/op
Benchmark_Iterator_Next-4                     	  201873	      5878 ns/op	 170136018 objects/sec	     896 B/op	       1 allocs/op
Benchmark_LowerBound-4                        	   16450	     72748 ns/op	  13746046 objects/sec	  104000 B/op	    2000 allocs/op
Benchmark_LowerBound_Random-4                 	   10000	    106103 ns/op	   9424788 objects/sec	   96384 B/op	    1002 allocs/op
Benchmark_Hashmap_Insert-4                    	   22062	     53894 ns/op	  18555111 objects/sec	   74264 B/op	      20 allocs/op
Benchmark_Hashmap_Get_Uint64-4                	  197614	      6027 ns/op	 165927913 objects/sec	       0 B/op	       0 allocs/op
Benchmark_Hashmap_Get_Bytes-4                 	  163320	      7383 ns/op	 135447880 objects/sec	       0 B/op	       0 allocs/op
Benchmark_Delete_Random-4                     	     100	  11849293 ns/op	   8439322 objects/sec	 2539393 B/op	  102756 allocs/op
Benchmark_find16-4                            	288410240	         4.137 ns/op	       0 B/op	       0 allocs/op
Benchmark_findIndex16-4                       	100000000	        10.92 ns/op	       0 B/op	       0 allocs/op
Benchmark_find64-4                            	363522753	         3.372 ns/op	       0 B/op	       0 allocs/op
Benchmark_findIndex64_hit-4                   	362967787	         3.309 ns/op	       0 B/op	       0 allocs/op
Benchmark_findIndex64_miss-4                  	333279888	         3.578 ns/op	       0 B/op	       0 allocs/op
Benchmark_find4-4                             	542656063	         2.217 ns/op	       0 B/op	       0 allocs/op
Benchmark_findIndex4-4                        	360711506	         3.310 ns/op	       0 B/op	       0 allocs/op
BenchmarkSmallWriteTxn/updates_1-4            	  550279	      2113 ns/op	    3529 B/op	       4 allocs/op
BenchmarkSmallWriteTxn/updates_2-4            	  409386	      2879 ns/op	    4742 B/op	       6 allocs/op
BenchmarkSmallWriteTxn/updates_4-4            	  254355	      4521 ns/op	    7155 B/op	      11 allocs/op
BenchmarkSmallWriteTxn/updates_8-4            	  150492	      7845 ns/op	   11927 B/op	      20 allocs/op
BenchmarkSmallWriteTxn/updates_16-4           	   82986	     14270 ns/op	   21289 B/op	      38 allocs/op
BenchmarkAtomicWatchPointerFirstChannel-4     	25599012	        46.62 ns/op	     120 B/op	       2 allocs/op
BenchmarkAtomicWatchPointerChannel-4          	729500395	         1.642 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	github.com/cilium/statedb/part	59.428s
PASS
ok  	github.com/cilium/statedb/reconciler	0.004s
?   	github.com/cilium/statedb/reconciler/benchmark	[no test files]
?   	github.com/cilium/statedb/reconciler/example	[no test files]
go run ./reconciler/benchmark -quiet
1000000 objects reconciled in 1.39 seconds (batch size 1000)
Throughput 717000.77 objects per second
506MB total allocated, 5010155 in-use objects, 231MB bytes in use

@joamaki
joamaki force-pushed the pr/joamaki/part-optimizations branch from dc81304 to 32ff31e Compare September 25, 2026 14:28
…ration

Prefix and lower bound searches on a non-unique index keep a set of the
visited primary keys to not yield the same object twice. Inserting into
the set with string(primary) copied the key, allocating once per yielded
object.

The keys are slices of the keys stored in the tree, which are never
mutated, so refer to them directly with unsafe.String.

Add a benchmark for lower bound search on a non-unique index.

                               │     old     │                new                 │
                               │   sec/op    │   sec/op     vs base               │
DB_Prefix_SecondaryIndex         87.38µ ± 2%   75.62µ ± 2%  -13.47% (p=0.000 n=8)
DB_LowerBound_SecondaryIndex     88.67µ ± 1%   79.71µ ± 6%  -10.11% (p=0.000 n=8)
geomean                          88.02µ        77.63µ       -11.80%

                               │     old      │                new                 │
                               │ objects/sec  │ objects/sec  vs base               │
DB_Prefix_SecondaryIndex         11.44M ± 11%   13.22M ± 2%  +15.56% (p=0.000 n=8)
DB_LowerBound_SecondaryIndex     11.28M ±  2%   12.55M ± 7%  +11.25% (p=0.000 n=8)
geomean                          11.36M         12.88M       +13.39%

                               │     old      │                 new                 │
                               │     B/op     │     B/op      vs base               │
DB_Prefix_SecondaryIndex         122.0Ki ± 0%   106.4Ki ± 0%  -12.80% (p=0.000 n=8)
DB_LowerBound_SecondaryIndex     122.4Ki ± 0%   106.8Ki ± 0%  -12.77% (p=0.000 n=8)
geomean                          122.2Ki        106.6Ki       -12.79%

                               │     old      │                new                │
                               │  allocs/op   │ allocs/op   vs base               │
DB_Prefix_SecondaryIndex         1026.00 ± 0%   26.00 ± 0%  -97.47% (p=0.000 n=8)
DB_LowerBound_SecondaryIndex     1031.00 ± 0%   31.00 ± 0%  -96.99% (p=0.000 n=8)
geomean                           1.028k        28.39       -97.24%

AIL:3
Signed-off-by: Jussi Maki <jussi@isovalent.com>
List() in a write transaction cloned the index transaction to get a
snapshot for the returned iterator. For a unique index the lookup is a
Get() and the returned singleton iterator does not refer to the tree,
so the snapshot is unnecessary. The clone was costly as it froze the
nodes in the transaction, forcing the next write to clone them again.

Query the transaction directly for unique indexes and add a benchmark
for List() followed by Insert() in a write transaction.

                │     old      │                new                 │
                │    sec/op    │   sec/op     vs base               │
DB_ListInsert     1409.9µ ± 2%   473.3µ ± 3%  -66.43% (p=0.000 n=8)

                │     old     │                 new                  │
                │ objects/sec │ objects/sec   vs base                │
DB_ListInsert     709.3k ± 2%   2112.6k ± 6%  +197.85% (p=0.000 n=8)

                │      old      │                 new                 │
                │     B/op      │     B/op      vs base               │
DB_ListInsert     2913.2Ki ± 0%   475.2Ki ± 0%  -83.69% (p=0.000 n=8)

                │     old     │                new                 │
                │  allocs/op  │  allocs/op   vs base               │
DB_ListInsert     14.08k ± 0%   11.07k ± 0%  -21.37% (p=0.000 n=8)

AIL:3
Signed-off-by: Jussi Maki <jussi@isovalent.com>
The lower bound search allocated a single element slice for the node at
which the search ended and grew the slice of edges to explore one edge
at a time.

Slice the node from its parent's children instead (only the starting
node needs the allocation) and preallocate a small capacity for the
edges. This brings the lower bound search down to a single allocation
in the common case.

Add a benchmark for LowerBound().

              │     old      │                new                 │
              │    sec/op    │   sec/op     vs base               │
LowerBound      132.47µ ± 4%   73.53µ ± 4%  -44.49% (p=0.000 n=8)

              │     old     │                 new                 │
              │ objects/sec │ objects/sec   vs base               │
LowerBound      7.549M ± 4%   13.600M ± 5%  +80.16% (p=0.000 n=8)

              │     old      │                 new                 │
              │     B/op     │     B/op      vs base               │
LowerBound      157.8Ki ± 0%   101.6Ki ± 0%  -35.66% (p=0.000 n=8)

              │     old     │                new                 │
              │  allocs/op  │  allocs/op   vs base               │
LowerBound      4.767k ± 0%   2.000k ± 0%  -58.04% (p=0.000 n=8)

AIL:3
Signed-off-by: Jussi Maki <jussi@isovalent.com>
The lower bound search found the smallest child equal to or larger than
the key with a binary search over the children, reading the key from
each probed child's header. findIndex() finds the same position from
the node's own key array or bitmap without touching the children.

Add a lower bound benchmark with random keys in a larger tree, which
exercises all the node kinds (sequential keys mostly produce node256s).

                     │      old      │                 new                  │
                     │    sec/op     │    sec/op     vs base                │
LowerBound              73.96µ ±  1%   73.33µ ±  1%   -0.84% (p=0.005 n=10)
LowerBound_Random      117.29µ ± 17%   92.50µ ± 21%  -21.13% (p=0.003 n=10)
geomean                 93.13µ         82.36µ        -11.57%

                     │     old      │                  new                  │
                     │ objects/sec  │  objects/sec   vs base                │
LowerBound             13.52M ±  1%    13.64M ±  1%   +0.85% (p=0.005 n=10)
LowerBound_Random      8.526M ± 21%   10.811M ± 18%  +26.80% (p=0.003 n=10)
geomean                10.74M          12.14M        +13.08%

                     │     old      │                  new                  │
                     │     B/op     │     B/op      vs base                 │
LowerBound             101.6Ki ± 0%   101.6Ki ± 0%       ~ (p=1.000 n=10) ¹
LowerBound_Random      94.12Ki ± 0%   94.12Ki ± 0%       ~ (p=1.000 n=10)
geomean                97.77Ki        97.77Ki       +0.00%
¹ all samples are equal

                     │     old     │                 new                  │
                     │  allocs/op  │  allocs/op   vs base                 │
LowerBound             2.000k ± 0%   2.000k ± 0%       ~ (p=1.000 n=10) ¹
LowerBound_Random      1.002k ± 0%   1.002k ± 0%       ~ (p=1.000 n=10) ¹
geomean                1.416k        1.416k       +0.00%
¹ all samples are equal

AIL:3
Signed-off-by: Jussi Maki <jussi@isovalent.com>
@joamaki
joamaki force-pushed the pr/joamaki/part-optimizations branch from 32ff31e to 1126955 Compare September 30, 2026 07:16
@joamaki
joamaki marked this pull request as ready for review September 30, 2026 07:17
@joamaki
joamaki requested a review from a team as a code owner September 30, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant