Skip to content

part: add bitmap Node64 and Node128 - #180

Merged
joamaki merged 2 commits into
mainfrom
pr/joamaki/node64-node128
Aug 25, 2026
Merged

part: add bitmap Node64 and Node128#180
joamaki merged 2 commits into
mainfrom
pr/joamaki/node64-node128

Conversation

@joamaki

@joamaki joamaki commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Replace Node48's 256-byte reverse index with packed, sorted child arrays indexed by a 256-bit bitmap and popcount. Add Node64 and Node128 stages between Node16 and Node256, including symmetric promotion and demotion paths. With these node sizes we'll have smaller allocations and cloning of the nodes is faster as there's less to copy. The Node64+Node128 is slightly less optimal for lookups than having just Node48 but it significantly reduces allocations.

Allocator sizes

On 64-bit Go:

Node Raw size Size class Slack
Node48 680 B 704 B 24 B
Node64 584 B 640 B 56 B
Node128 1096 B 1152 B 56 B
Node256 2088 B 2304 B 216 B

Thus Node64 (with bitmaps) has 16 more child slots than Node48 while using a smaller allocator class. Node128 delays the much larger Node256 allocation until fanout exceeds 128.

Benchmarks

part benchmarks

10 runs, 300 ms benchtime:

goos: linux
goarch: arm64
pkg: github.com/cilium/statedb/part
                                   │   before    │                after                 │
                                   │   sec/op    │   sec/op     vs base                │
_Uint64Map_Sequential_Insert-6        520.3µ ± 4%   446.2µ ± 3%  -14.24% (p=0.000 n=10)
_Uint64Map_Sequential_Txn_Insert-6    71.33µ ± 1%   75.09µ ± 1%   +5.27% (p=0.000 n=10)
_Uint64Map_Random_Insert-6            624.1µ ± 3%   413.7µ ± 1%  -33.72% (p=0.000 n=10)
_Uint64Map_Random_Txn_Insert-6        111.5µ ± 2%   117.3µ ± 2%   +5.16% (p=0.000 n=10)
_Insert_RootOnlyWatch-6               74.87µ ± 3%   75.92µ ± 3%        ~ (p=0.105 n=10)
_Get-6                                16.12µ ± 1%   16.22µ ± 1%   +0.60% (p=0.027 n=10)
SmallWriteTxn/updates_1-6             2.241µ ± 1%   1.961µ ± 1%  -12.47% (p=0.000 n=10)
SmallWriteTxn/updates_2-6             3.487µ ± 2%   2.760µ ± 1%  -20.85% (p=0.000 n=10)
SmallWriteTxn/updates_4-6             5.899µ ± 2%   4.495µ ± 4%  -23.80% (p=0.000 n=10)
SmallWriteTxn/updates_8-6            10.614µ ± 2%   7.796µ ± 6%  -26.55% (p=0.002 n=10)
SmallWriteTxn/updates_16-6            20.08µ ± 1%   14.23µ ± 3%  -29.12% (p=0.000 n=10)
geomean                               31.53µ        26.93µ       -14.59%
                                   │   before    │                 after                  │
                                   │    B/op     │    B/op      vs base                  │
_Uint64Map_Sequential_Insert-6        2.106Mi ± 0%   1.716Mi ± 0%  -18.54% (p=0.000 n=10)
_Uint64Map_Sequential_Txn_Insert-6    84.33Ki ± 0%   88.58Ki ± 0%   +5.04% (p=0.000 n=10)
_Uint64Map_Random_Insert-6            2.402Mi ± 0%   1.352Mi ± 0%  -43.70% (p=0.000 n=10)
_Uint64Map_Random_Txn_Insert-6        116.2Ki ± 1%   114.6Ki ± 1%   -1.42% (p=0.000 n=10)
_Insert_RootOnlyWatch-6               69.83Ki ± 0%   74.02Ki ± 0%   +6.00% (p=0.000 n=10)
_Get-6                                  0.000 ± 0%     0.000 ± 0%        ~ (p=1.000 n=10)
SmallWriteTxn/updates_1-6             4.681Ki ± 0%   3.548Ki ± 0%  -24.20% (p=0.000 n=10)
SmallWriteTxn/updates_2-6             6.994Ki ± 0%   4.732Ki ± 0%  -32.34% (p=0.000 n=10)
SmallWriteTxn/updates_4-6            11.594Ki ± 0%   7.090Ki ± 0%  -38.85% (p=0.000 n=10)
SmallWriteTxn/updates_8-6             20.69Ki ± 0%   11.75Ki ± 0%  -43.21% (p=0.000 n=10)
SmallWriteTxn/updates_16-6            38.52Ki ± 0%   20.89Ki ± 0%  -45.76% (p=0.000 n=10)

The small write transaction allocation counts are unchanged.

Reconciler benchmark

1,000,000 objects and incremental batch size 1000. Parent and changed binaries were alternated; results are the best throughput of three runs per batch size:

Batch Before obj/s After obj/s Change Before allocated After allocated Change
1 160071.01 183551.30 +14.67% 9946 MB 8237 MB -17.18%
10 620465.78 594884.80 -4.12% 1793 MB 1649 MB -8.03%
100 445345.12 532524.79 +19.57% 970 MB 969 MB -0.10%
1000 663607.42 697113.34 +5.05% 888 MB 901 MB +1.46%

AIL:3

@joamaki
joamaki requested a review from a team as a code owner August 24, 2026 08:20
@joamaki
joamaki requested review from pippolo84 and removed request for a team August 24, 2026 08:20
@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
$ make
go build ./...
go: downloading go.yaml.in/yaml/v3 v3.0.4
go: downloading github.com/cilium/hive v1.0.4
go: downloading golang.org/x/time v0.15.0
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 github.com/spf13/viper v1.18.2
go: downloading go.uber.org/dig v1.17.1
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	375.626s	coverage: 79.3% of statements
ok  	github.com/cilium/statedb/index	0.005s	coverage: 33.7% of statements
ok  	github.com/cilium/statedb/internal	0.031s	coverage: 42.9% of statements
ok  	github.com/cilium/statedb/lpm	3.098s	coverage: 77.6% of statements
ok  	github.com/cilium/statedb/part	73.075s	coverage: 87.7% of statements
ok  	github.com/cilium/statedb/reconciler	0.306s	coverage: 93.1% 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	33.302s
ok  	github.com/cilium/statedb/index	1.014s
ok  	github.com/cilium/statedb/internal	1.022s
ok  	github.com/cilium/statedb/lpm	2.471s
ok  	github.com/cilium/statedb/part	29.417s
ok  	github.com/cilium/statedb/reconciler	1.370s
?   	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: INTEL(R) XEON(R) PLATINUM 8573C
BenchmarkDB_WriteTxn_1-4                      	  954303	      1214 ns/op	    823529 objects/sec	     704 B/op	      17 allocs/op
BenchmarkDB_WriteTxn_10-4                     	 2440088	       497.7 ns/op	   2009400 objects/sec	     386 B/op	       8 allocs/op
BenchmarkDB_WriteTxn_100-4                    	 2917158	       409.3 ns/op	   2443423 objects/sec	     349 B/op	       7 allocs/op
BenchmarkDB_WriteTxn_1000-4                   	 2651908	       455.7 ns/op	   2194423 objects/sec	     350 B/op	       7 allocs/op
BenchmarkDB_WriteTxn_100_SecondaryIndex-4     	 1275572	       997.3 ns/op	   1002667 objects/sec	     747 B/op	      20 allocs/op
BenchmarkDB_WriteTxn_CommitOnly_100Tables-4   	 1000000	      1077 ns/op	    1128 B/op	       6 allocs/op
BenchmarkDB_WriteTxn_CommitOnly_1Table-4      	 1760620	       682.2 ns/op	     240 B/op	       6 allocs/op
BenchmarkDB_NewWriteTxn-4                     	 1932810	       620.9 ns/op	     216 B/op	       5 allocs/op
BenchmarkDB_WriteTxnCommit100-4               	 1000000	      1094 ns/op	    1112 B/op	       6 allocs/op
BenchmarkDB_NewReadTxn-4                      	820949794	         1.466 ns/op	       0 B/op	       0 allocs/op
BenchmarkDB_Modify-4                          	    2329	    503372 ns/op	   1986601 objects/sec	  374574 B/op	    8080 allocs/op
BenchmarkDB_GetInsert-4                       	    2200	    546699 ns/op	   1829159 objects/sec	  358569 B/op	    8080 allocs/op
BenchmarkDB_RandomInsert-4                    	    2563	    482574 ns/op	   2072220 objects/sec	  350566 B/op	    7080 allocs/op
BenchmarkDB_RandomReplace-4                   	     565	   2080162 ns/op	    480732 objects/sec	 1472845 B/op	   28111 allocs/op
BenchmarkDB_SequentialInsert-4                	    2649	    464252 ns/op	   2154001 objects/sec	  350564 B/op	    7080 allocs/op
BenchmarkDB_SequentialInsert_Prefix-4         	     613	   1917580 ns/op	    521491 objects/sec	 2840378 B/op	   45536 allocs/op
BenchmarkDB_Changes_Baseline-4                	    2160	    560974 ns/op	   1782614 objects/sec	  444574 B/op	    9201 allocs/op
BenchmarkDB_Changes-4                         	    1192	   1025411 ns/op	    975219 objects/sec	  660798 B/op	   12371 allocs/op
BenchmarkDB_RandomLookup-4                    	   29688	     40050 ns/op	  24968582 objects/sec	       0 B/op	       0 allocs/op
BenchmarkDB_SequentialLookup-4                	   41898	     28460 ns/op	  35137045 objects/sec	       0 B/op	       0 allocs/op
BenchmarkDB_Prefix_SecondaryIndex-4           	    9148	    116774 ns/op	   8563532 objects/sec	  124952 B/op	    1026 allocs/op
BenchmarkDB_FullIteration_All-4               	    1312	    865903 ns/op	 115486384 objects/sec	     104 B/op	       4 allocs/op
BenchmarkDB_FullIteration_Prefix-4            	    1359	    877789 ns/op	 113922629 objects/sec	     136 B/op	       5 allocs/op
BenchmarkDB_FullIteration_Get-4               	     339	   3470660 ns/op	  28812961 objects/sec	       0 B/op	       0 allocs/op
BenchmarkDB_FullIteration_Get_Secondary-4     	     186	   6297601 ns/op	  15879063 objects/sec	       0 B/op	       0 allocs/op
BenchmarkDB_FullIteration_ReadTxnGet-4        	     339	   3549459 ns/op	  28173306 objects/sec	       0 B/op	       0 allocs/op
BenchmarkDB_PropagationDelay-4                	  948352	      1273 ns/op	        11.00 50th_µs	        13.00 90th_µs	        45.00 99th_µs	     877 B/op	      20 allocs/op
BenchmarkDB_WriteTxn_100_LPMIndex-4           	  632568	      1906 ns/op	    524710 objects/sec	    1638 B/op	      37 allocs/op
BenchmarkDB_WriteTxn_1_LPMIndex-4             	  159456	     12125 ns/op	     82474 objects/sec	   14162 B/op	      84 allocs/op
BenchmarkDB_LPMIndex_Get-4                    	     385	   3111297 ns/op	   3214094 objects/sec	       0 B/op	       0 allocs/op
BenchmarkWatchSet_4-4                         	 2770230	       427.5 ns/op	     296 B/op	       4 allocs/op
BenchmarkWatchSet_16-4                        	  836847	      1441 ns/op	    1096 B/op	       5 allocs/op
BenchmarkWatchSet_128-4                       	   89992	     13301 ns/op	    8904 B/op	       5 allocs/op
BenchmarkWatchSet_1024-4                      	    9256	    132478 ns/op	   73743 B/op	       5 allocs/op
PASS
ok  	github.com/cilium/statedb	45.281s
PASS
ok  	github.com/cilium/statedb/index	0.003s
goos: linux
goarch: amd64
pkg: github.com/cilium/statedb/internal
cpu: INTEL(R) XEON(R) PLATINUM 8573C
Benchmark_SortableMutex-4   	 7417578	       159.4 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	github.com/cilium/statedb/internal	1.186s
goos: linux
goarch: amd64
pkg: github.com/cilium/statedb/lpm
cpu: INTEL(R) XEON(R) PLATINUM 8573C
Benchmark_txn_insert/batchSize=1-4         	    2455	    502503 ns/op	   1990039 objects/sec	  838424 B/op	   13975 allocs/op
Benchmark_txn_insert/batchSize=10-4        	    3951	    299495 ns/op	   3338953 objects/sec	  385200 B/op	    6668 allocs/op
Benchmark_txn_insert/batchSize=100-4       	    4284	    281229 ns/op	   3555815 objects/sec	  345618 B/op	    6027 allocs/op
Benchmark_txn_delete/batchSize=1-4         	    1770	    668319 ns/op	   1496290 objects/sec	 1286472 B/op	   13976 allocs/op
Benchmark_txn_delete/batchSize=10-4        	    3590	    329145 ns/op	   3038171 objects/sec	  372418 B/op	    5769 allocs/op
Benchmark_txn_delete/batchSize=100-4       	    3945	    295580 ns/op	   3383180 objects/sec	  286753 B/op	    5038 allocs/op
Benchmark_LPM_Lookup-4                     	    9511	    126534 ns/op	   7903044 objects/sec	       0 B/op	       0 allocs/op
Benchmark_LPM_All-4                        	  154386	      7788 ns/op	 128407560 objects/sec	      32 B/op	       1 allocs/op
Benchmark_LPM_Prefix-4                     	  156145	      7717 ns/op	 129589997 objects/sec	      32 B/op	       1 allocs/op
Benchmark_LPM_LowerBound-4                 	  294406	      4066 ns/op	 122956331 objects/sec	     288 B/op	       2 allocs/op
PASS
ok  	github.com/cilium/statedb/lpm	11.972s
goos: linux
goarch: amd64
pkg: github.com/cilium/statedb/part
cpu: INTEL(R) XEON(R) PLATINUM 8573C
Benchmark_Uint64Map_Random-4                  	    2162	    511793 ns/op	   1953916 items/sec	 1322001 B/op	    6036 allocs/op
Benchmark_Uint64Map_Sequential-4              	    2455	    506083 ns/op	   1975960 items/sec	 1703090 B/op	    5753 allocs/op
Benchmark_Uint64Map_Sequential_Insert-4       	    2612	    470273 ns/op	   2126422 items/sec	 1695082 B/op	    4752 allocs/op
Benchmark_Uint64Map_Sequential_Txn_Insert-4   	   13966	     86089 ns/op	  11615935 items/sec	   90464 B/op	    2031 allocs/op
Benchmark_Uint64Map_Random_Insert-4           	    2644	    456166 ns/op	   2192185 items/sec	 1314744 B/op	    5038 allocs/op
Benchmark_Uint64Map_Random_Txn_Insert-4       	    8359	    145468 ns/op	   6874381 items/sec	  117534 B/op	    2414 allocs/op
Benchmark_Insert_RootOnlyWatch-4              	   13692	     87582 ns/op	  11417921 objects/sec	   75552 B/op	    2036 allocs/op
Benchmark_Insert-4                            	   10000	    111454 ns/op	   8972340 objects/sec	   84256 B/op	    3067 allocs/op
Benchmark_WatchReplace-4                      	   12534	     95771 ns/op	  10441607 objects/sec	   65345 B/op	    2011 allocs/op
Benchmark_Modify-4                            	   16212	     74217 ns/op	  13474075 objects/sec	   58056 B/op	    1007 allocs/op
Benchmark_GetInsert-4                         	   12616	     95164 ns/op	  10508159 objects/sec	   58056 B/op	    1007 allocs/op
Benchmark_Replace-4                           	38268174	        31.65 ns/op	  31600389 objects/sec	       0 B/op	       0 allocs/op
Benchmark_Replace_RootOnlyWatch-4             	37088250	        31.61 ns/op	  31639926 objects/sec	       0 B/op	       0 allocs/op
Benchmark_txn_1-4                             	11143674	       107.8 ns/op	   9278159 objects/sec	      64 B/op	       3 allocs/op
Benchmark_txn_10-4                            	13405741	        87.32 ns/op	  11452335 objects/sec	      76 B/op	       2 allocs/op
Benchmark_txn_100-4                           	15079969	        79.49 ns/op	  12580216 objects/sec	      67 B/op	       2 allocs/op
Benchmark_txn_1000-4                          	12579942	        92.59 ns/op	  10800647 objects/sec	      65 B/op	       2 allocs/op
Benchmark_txn_delete_1-4                      	 5824280	       202.2 ns/op	   4945418 objects/sec	     632 B/op	       3 allocs/op
Benchmark_txn_delete_10-4                     	13597917	        86.95 ns/op	  11501399 objects/sec	     103 B/op	       1 allocs/op
Benchmark_txn_delete_100-4                    	17613073	        67.52 ns/op	  14810884 objects/sec	      35 B/op	       1 allocs/op
Benchmark_txn_delete_1000-4                   	18092367	        65.49 ns/op	  15268696 objects/sec	      28 B/op	       1 allocs/op
Benchmark_Get-4                               	   62144	     19227 ns/op	  52010462 objects/sec	       0 B/op	       0 allocs/op
Benchmark_GetWatch-4                          	   61881	     19281 ns/op	  51864928 objects/sec	       0 B/op	       0 allocs/op
Benchmark_All-4                               	  224845	      5336 ns/op	 187399188 objects/sec	       0 B/op	       0 allocs/op
Benchmark_Iterator_All-4                      	  203318	      6156 ns/op	 162440210 objects/sec	       0 B/op	       0 allocs/op
Benchmark_Iterator_Next-4                     	  217250	      5417 ns/op	 184616222 objects/sec	     896 B/op	       1 allocs/op
Benchmark_Hashmap_Insert-4                    	   24475	     48891 ns/op	  20453574 objects/sec	   74264 B/op	      20 allocs/op
Benchmark_Hashmap_Get_Uint64-4                	  224139	      5365 ns/op	 186401880 objects/sec	       0 B/op	       0 allocs/op
Benchmark_Hashmap_Get_Bytes-4                 	  190845	      6297 ns/op	 158802220 objects/sec	       0 B/op	       0 allocs/op
Benchmark_Delete_Random-4                     	      87	  13791447 ns/op	   7250871 objects/sec	 2539401 B/op	  102756 allocs/op
Benchmark_find16-4                            	288868742	         4.187 ns/op	       0 B/op	       0 allocs/op
Benchmark_findIndex16-4                       	130233696	         9.195 ns/op	       0 B/op	       0 allocs/op
Benchmark_find64-4                            	352031884	         3.409 ns/op	       0 B/op	       0 allocs/op
Benchmark_findIndex64_hit-4                   	343945867	         3.482 ns/op	       0 B/op	       0 allocs/op
Benchmark_findIndex64_miss-4                  	327811386	         3.811 ns/op	       0 B/op	       0 allocs/op
Benchmark_find4-4                             	614324005	         1.967 ns/op	       0 B/op	       0 allocs/op
Benchmark_findIndex4-4                        	265278496	         4.352 ns/op	       0 B/op	       0 allocs/op
BenchmarkSmallWriteTxn/updates_1-4            	  498548	      2346 ns/op	    3529 B/op	       4 allocs/op
BenchmarkSmallWriteTxn/updates_2-4            	  320991	      3350 ns/op	    4742 B/op	       6 allocs/op
BenchmarkSmallWriteTxn/updates_4-4            	  217634	      5242 ns/op	    7155 B/op	      11 allocs/op
BenchmarkSmallWriteTxn/updates_8-4            	  127606	      9073 ns/op	   11927 B/op	      20 allocs/op
BenchmarkSmallWriteTxn/updates_16-4           	   70213	     16910 ns/op	   21290 B/op	      38 allocs/op
PASS
ok  	github.com/cilium/statedb/part	51.410s
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.56 seconds (batch size 1000)
Throughput 640523.10 objects per second
629MB total allocated, 6015110 in-use objects, 238MB bytes in use

@pippolo84 pippolo84 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The addition of the two intermediate sizes Node64 and Node128 is indeed effective. Nice!

Add a benchmark for small committed transactions against a prepopulated random tree whose second-level nodes have a mean fanout of 96. This isolates the path-copying cost of transactions containing 1, 2, 4, 8, or 16 updates.

Signed-off-by: Jussi Maki <jussi@isovalent.com>
Replace Node48's 256-byte reverse index with packed, sorted child
arrays indexed by a 256-bit bitmap and popcount. Add Node64 and
Node128 stages between Node16 and Node256, including symmetric
promotion and demotion paths.

On 64-bit Go, the node sizes and allocator classes are:

             raw size   size class   slack
  Node48          680B         704B     24B
  Node64          584B         640B     56B
  Node128        1096B        1152B     56B
  Node256        2088B        2304B    216B

Thus Node64 has 16 more child slots than Node48 while using a smaller
allocator class. Node128 delays the much larger Node256 allocation
until fanout exceeds 128.

part benchmarks (10 runs, 300ms benchtime):

goos: linux
goarch: arm64
pkg: github.com/cilium/statedb/part
                                   │   before    │                after                 │
                                   │   sec/op    │   sec/op     vs base                │
_Uint64Map_Sequential_Insert-6        520.3µ ± 4%   446.2µ ± 3%  -14.24% (p=0.000 n=10)
_Uint64Map_Sequential_Txn_Insert-6    71.33µ ± 1%   75.09µ ± 1%   +5.27% (p=0.000 n=10)
_Uint64Map_Random_Insert-6            624.1µ ± 3%   413.7µ ± 1%  -33.72% (p=0.000 n=10)
_Uint64Map_Random_Txn_Insert-6        111.5µ ± 2%   117.3µ ± 2%   +5.16% (p=0.000 n=10)
_Insert_RootOnlyWatch-6               74.87µ ± 3%   75.92µ ± 3%        ~ (p=0.105 n=10)
_Get-6                                16.12µ ± 1%   16.22µ ± 1%   +0.60% (p=0.027 n=10)
SmallWriteTxn/updates_1-6             2.241µ ± 1%   1.961µ ± 1%  -12.47% (p=0.000 n=10)
SmallWriteTxn/updates_2-6             3.487µ ± 2%   2.760µ ± 1%  -20.85% (p=0.000 n=10)
SmallWriteTxn/updates_4-6             5.899µ ± 2%   4.495µ ± 4%  -23.80% (p=0.000 n=10)
SmallWriteTxn/updates_8-6            10.614µ ± 2%   7.796µ ± 6%  -26.55% (p=0.002 n=10)
SmallWriteTxn/updates_16-6            20.08µ ± 1%   14.23µ ± 3%  -29.12% (p=0.000 n=10)
geomean                               31.53µ        26.93µ       -14.59%

                                   │   before    │                 after                  │
                                   │    B/op     │    B/op      vs base                  │
_Uint64Map_Sequential_Insert-6        2.106Mi ± 0%   1.716Mi ± 0%  -18.54% (p=0.000 n=10)
_Uint64Map_Sequential_Txn_Insert-6    84.33Ki ± 0%   88.58Ki ± 0%   +5.04% (p=0.000 n=10)
_Uint64Map_Random_Insert-6            2.402Mi ± 0%   1.352Mi ± 0%  -43.70% (p=0.000 n=10)
_Uint64Map_Random_Txn_Insert-6        116.2Ki ± 1%   114.6Ki ± 1%   -1.42% (p=0.000 n=10)
_Insert_RootOnlyWatch-6               69.83Ki ± 0%   74.02Ki ± 0%   +6.00% (p=0.000 n=10)
_Get-6                                  0.000 ± 0%     0.000 ± 0%        ~ (p=1.000 n=10)
SmallWriteTxn/updates_1-6             4.681Ki ± 0%   3.548Ki ± 0%  -24.20% (p=0.000 n=10)
SmallWriteTxn/updates_2-6             6.994Ki ± 0%   4.732Ki ± 0%  -32.34% (p=0.000 n=10)
SmallWriteTxn/updates_4-6            11.594Ki ± 0%   7.090Ki ± 0%  -38.85% (p=0.000 n=10)
SmallWriteTxn/updates_8-6             20.69Ki ± 0%   11.75Ki ± 0%  -43.21% (p=0.000 n=10)
SmallWriteTxn/updates_16-6            38.52Ki ± 0%   20.89Ki ± 0%  -45.76% (p=0.000 n=10)

The small write transaction allocation counts are unchanged.

Reconciler benchmark, 1,000,000 objects and incremental batch size
1000. Parent and changed binaries were alternated; results are the
best throughput of three runs per batch size:

 batch   before obj/s   after obj/s   change   before alloc   after alloc   change
     1      160071.01      183551.30  +14.67%         9946MB        8237MB  -17.18%
    10      620465.78      594884.80   -4.12%         1793MB        1649MB   -8.03%
   100      445345.12      532524.79  +19.57%          970MB         969MB   -0.10%
  1000      663607.42      697113.34   +5.05%          888MB         901MB   +1.46%

AIL:3
Signed-off-by: Jussi Maki <jussi@isovalent.com>
@joamaki
joamaki force-pushed the pr/joamaki/node64-node128 branch from 075436f to fb4ff86 Compare August 25, 2026 11:38
@joamaki
joamaki merged commit 4b3ef0a into main Aug 25, 2026
1 check passed
@joamaki
joamaki deleted the pr/joamaki/node64-node128 branch August 25, 2026 11:48
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.

2 participants