Table of Contents

JNet: benchmark results by CPU model

Median of the per-run BenchmarkDotNet Mean across all CI matrix cells (OS, .NET and JDK combinations) that ran on the same CPU model; the clock frequency reported by BenchmarkDotNet is ignored. The number of runs is in each column header. CPU models seen in fewer than 5 cells are omitted. Allocated is the same on every run. Runners that report no arm64 processor model are grouped with Neoverse-N2.

JVM object creation

Benchmark arm64 (Neoverse-N2, or model not reported)
88 runs
AMD EPYC 7763
25 runs
Intel Xeon 6975P-C
23 runs
AMD EPYC 9V45
16 runs
AMD EPYC 9V74
11 runs
Intel Xeon Platinum 8573C
8 runs
Allocated
NewEmpty 795.8 ns 900.4 ns 516.2 ns 480.8 ns 660.5 ns 794.5 ns 368 B
NewWithSignature 795.9 ns 908.0 ns 517.6 ns 472.9 ns 667.2 ns 795.1 ns 368 B
DeclaredNewEmpty 796.4 ns 897.8 ns 516.2 ns 469.4 ns 655.8 ns 790.7 ns 368 B

Field access

Benchmark arm64 (Neoverse-N2, or model not reported)
88 runs
AMD EPYC 7763
25 runs
Intel Xeon 6975P-C
23 runs
AMD EPYC 9V45
16 runs
AMD EPYC 9V74
11 runs
Intel Xeon Platinum 8573C
8 runs
Allocated
GetInstanceIntField 65.85 ns 74.04 ns 33.04 ns 37.13 ns 54.09 ns 64.71 ns 24 B
SetInstanceIntField 94.88 ns 82.54 ns 40.56 ns 42.36 ns 63.41 ns 75.13 ns 24 B
GetInstanceStringField 84.07 ns 73.39 ns 36.28 ns 36.80 ns 54.81 ns 63.64 ns 0 B
SetInstanceStringField 536.96 ns 590.38 ns 305.68 ns 286.16 ns 387.44 ns 509.81 ns 248 B
GetStaticIntField 93.58 ns 80.51 ns 38.45 ns 41.34 ns 59.94 ns 69.83 ns 24 B
SetStaticIntField 96.55 ns 80.47 ns 40.18 ns 42.49 ns 62.30 ns 77.50 ns 24 B
GetStaticStringField 82.09 ns 68.86 ns 33.52 ns 36.10 ns 52.34 ns 63.81 ns 0 B
SetStaticStringField 531.52 ns 602.34 ns 306.32 ns 290.11 ns 398.54 ns 497.75 ns 248 B
GetInstanceIntFieldGeneric 77.35 ns 72.59 ns 32.27 ns 35.21 ns 50.37 ns 59.92 ns 0 B

Method invocation

Benchmark arm64 (Neoverse-N2, or model not reported)
88 runs
AMD EPYC 7763
25 runs
Intel Xeon 6975P-C
23 runs
AMD EPYC 9V45
16 runs
AMD EPYC 9V74
11 runs
Intel Xeon Platinum 8573C
8 runs
Allocated
InvokeStaticEmpty 148.1 ns 138.3 ns 72.92 ns 71.11 ns 111.3 ns 120.3 ns 0 B
InvokeStaticEmptyWithSignature 150.3 ns 145.8 ns 71.95 ns 74.45 ns 114.4 ns 121.9 ns 0 B
InvokeStaticWithFeedback 512.8 ns 540.4 ns 266.84 ns 248.80 ns 385.6 ns 459.2 ns 248 B
InvokeInstanceEmpty 153.5 ns 150.4 ns 73.86 ns 70.65 ns 115.7 ns 122.2 ns 0 B
InvokeInstanceWithFeedback 518.7 ns 564.0 ns 265.72 ns 249.88 ns 398.3 ns 457.6 ns 248 B

Array and varargs invocation

Benchmark arm64 (Neoverse-N2, or model not reported)
88 runs
AMD EPYC 7763
25 runs
Intel Xeon 6975P-C
23 runs
AMD EPYC 9V45
16 runs
AMD EPYC 9V74
11 runs
Intel Xeon Platinum 8573C
8 runs
Allocated
InvokeIntParam (10) 501.9 ns 552.5 ns 261.9 ns 244.8 ns 382.1 ns 467.9 ns 248 B
InvokeIntParam (1000) 502.5 ns 552.7 ns 263.6 ns 254.4 ns 377.6 ns 459.2 ns 248 B
InvokeIntParam (10000) 503.4 ns 546.6 ns 261.7 ns 246.8 ns 381.6 ns 472.8 ns 248 B
InvokeIntArrayFixed (10) 814.3 ns 1,016.5 ns 464.0 ns 518.8 ns 708.8 ns 767.7 ns 344 B
InvokeIntArrayFixed (1000) 1,507.7 ns 1,740.4 ns 1,107.2 ns 930.2 ns 1,429.4 ns 1,585.5 ns 344 B
InvokeIntArrayFixed (10000) 6,159.9 ns 7,939.9 ns 7,673.9 ns 4,435.2 ns 5,941.1 ns 8,987.9 ns 344 B
InvokeVarArgsWholeArray (10) 813.6 ns 1,011.1 ns 466.7 ns 511.4 ns 697.2 ns 779.8 ns 344 B
InvokeVarArgsWholeArray (1000) 1,510.9 ns 1,742.6 ns 1,109.3 ns 921.4 ns 1,424.3 ns 1,620.6 ns 344 B
InvokeVarArgsWholeArray (10000) 6,154.2 ns 7,956.4 ns 7,723.3 ns 4,471.9 ns 5,959.8 ns 8,956.9 ns 344 B
InvokeStringArrayFixed (10) 4,109.5 ns 4,351.3 ns 2,591.8 ns 2,318.0 ns 3,040.9 ns 3,909.1 ns 1968 B
InvokeStringArrayFixed (1000) 296,500.6 ns 288,553.6 ns 184,699.6 ns 154,481.4 ns 194,685.4 ns 274,432.0 ns 160368 B
InvokeStringArrayFixed (10000) 3,271,643.4 ns 3,617,416.2 ns 2,083,735.3 ns 1,896,634.8 ns 2,495,092.1 ns 3,158,779.0 ns 1600436 B
InvokeVarArgsSpreadElements (10) 5,398.5 ns 6,796.5 ns 4,751.3 ns 3,020.2 ns 4,028.4 ns 6,745.2 ns 2584 B
InvokeVarArgsSpreadElements (1000) 455,159.3 ns 565,487.1 ns 421,848.3 ns 227,198.4 ns 316,893.9 ns 582,271.6 ns 232264 B
InvokeVarArgsSpreadElements (10000) 4,907,128.4 ns 6,609,325.0 ns 4,532,321.8 ns 2,759,300.0 ns 3,842,430.8 ns 6,351,248.7 ns 2320332 B
InvokeIntArrayFixedSegment (10) 806.4 ns 1,010.5 ns 459.4 ns 510.7 ns 702.5 ns 768.2 ns 344 B
InvokeIntArrayFixedSegment (1000) 1,177.5 ns 1,320.3 ns 712.3 ns 725.2 ns 1,074.0 ns 1,183.7 ns 344 B
InvokeIntArrayFixedSegment (10000) 3,496.2 ns 4,448.6 ns 3,840.7 ns 2,531.5 ns 3,396.9 ns 4,646.3 ns 344 B
InvokeIntArrayFixedSlicedCopy (10) 810.3 ns 1,028.0 ns 465.9 ns 507.4 ns 696.2 ns 776.2 ns 344 B
InvokeIntArrayFixedSlicedCopy (1000) 1,184.9 ns 1,332.4 ns 716.0 ns 736.5 ns 1,070.4 ns 1,190.0 ns 344 B
InvokeIntArrayFixedSlicedCopy (10000) 3,491.1 ns 4,435.8 ns 3,865.2 ns 2,521.1 ns 3,392.1 ns 4,648.8 ns 344 B
InvokeIntArrayFixedSegmentFull (10) 810.4 ns 1,011.7 ns 465.4 ns 498.4 ns 709.0 ns 778.0 ns 344 B
InvokeIntArrayFixedSegmentFull (1000) 1,509.0 ns 1,728.7 ns 1,095.1 ns 925.4 ns 1,431.6 ns 1,590.3 ns 344 B
InvokeIntArrayFixedSegmentFull (10000) 6,147.9 ns 7,930.4 ns 7,631.4 ns 4,405.3 ns 5,954.6 ns 8,895.6 ns 344 B

Preallocated JVM objects

Benchmark arm64 (Neoverse-N2, or model not reported)
88 runs
AMD EPYC 7763
25 runs
Intel Xeon 6975P-C
23 runs
AMD EPYC 9V45
16 runs
AMD EPYC 9V74
11 runs
Intel Xeon Platinum 8573C
8 runs
Allocated
InvokeSingleStringPreallocated (10) 538.4 ns 576.7 ns 281.4 ns 264.3 ns 415.5 ns 486.8 ns 224 B
InvokeSingleStringPreallocated (1000) 539.8 ns 579.3 ns 282.9 ns 281.2 ns 412.5 ns 468.0 ns 224 B
InvokeSingleStringPreallocated (10000) 552.0 ns 609.4 ns 296.5 ns 277.0 ns 438.1 ns 490.2 ns 224 B
InvokeStringArrayPreallocated (10) 1,739.8 ns 1,859.7 ns 990.6 ns 1,002.9 ns 1,349.9 ns 1,552.5 ns 688 B
InvokeStringArrayPreallocated (1000) 62,083.5 ns 42,723.6 ns 33,383.6 ns 27,670.5 ns 31,917.4 ns 47,748.7 ns 32368 B
InvokeStringArrayPreallocated (10000) 834,539.4 ns 680,187.7 ns 532,545.8 ns 401,048.1 ns 519,242.4 ns 698,853.3 ns 320436 B

Multi-parameter invocation

Benchmark arm64 (Neoverse-N2, or model not reported)
88 runs
AMD EPYC 7763
25 runs
Intel Xeon 6975P-C
23 runs
AMD EPYC 9V45
16 runs
AMD EPYC 9V74
11 runs
Intel Xeon Platinum 8573C
8 runs
Allocated
InvokeMultiParam 930.7 ns 1.198 μs 583.5 ns 592.0 ns 848.5 ns 951.2 ns 608 B

JVM→.NET callback (sustained)

Benchmark arm64 (Neoverse-N2, or model not reported)
88 runs
AMD EPYC 7763
25 runs
Intel Xeon 6975P-C
23 runs
AMD EPYC 9V45
16 runs
AMD EPYC 9V74
11 runs
Intel Xeon Platinum 8573C
8 runs
Allocated
by index, first gate discard 44.96 ns 34.23 ns 37.16 ns 31.62 ns 27.63 ns 50.95 ns 0 B
by index, second gate discard 238.37 ns 242.47 ns 138.36 ns 131.56 ns 177.66 ns 216.98 ns 112 B
by index, full processing 2,595.64 ns 3,074.18 ns 1,764.39 ns 1,499.54 ns 2,080.73 ns 2,704.68 ns 592 B
by name, first gate discard 54.04 ns 38.09 ns 38.88 ns 33.74 ns 32.76 ns 54.91 ns 0 B
by name, second gate discard 249.02 ns 247.95 ns 142.83 ns 134.67 ns 177.41 ns 223.40 ns 112 B
by name, full processing 2,599.31 ns 3,090.50 ns 1,772.85 ns 1,510.10 ns 2,084.93 ns 2,670.77 ns 592 B

From JCOBridge 2.6.10 byIndex = true and byIndex = false are practically equivalent: the index is resolved once and used as the key of a hashmap.