perf: keep WINDOW_G=12, increase benchmark warmup

Tested WINDOW_G=15 (matching C libsecp256k1): 5.6x slower than native.
WINDOW_G=12 is faster at 4.3x because the 8192-entry table (1MB) at
w=15 causes cache pressure on JVM — heap-allocated AffinePoint objects
are scattered in memory, unlike C's contiguous compile-time .rodata.
WINDOW_G=12 (1024 entries, ~128KB) fits comfortably in L2 cache.

Increased verify benchmark warmup to 200+500 for stable measurements
(first call builds the lazy table).

https://claude.ai/code/session_01BhU63WUe9AhikZxRdw3Lpg
This commit is contained in:
Claude
2026-04-06 17:23:13 +00:00
parent 69ee4bd11d
commit beaf452d55
@@ -134,8 +134,8 @@ class Secp256k1Benchmark {
results +=
bench(
name = "verifySchnorr",
warmup = 50,
iterations = 200,
warmup = 200,
iterations = 500,
nativeOp = { native.verifySchnorr(nativeSig, msg32, nativeXOnlyPub) },
kotlinOp = {
com.vitorpamplona.quartz.utils.secp256k1.Secp256k1.verifySchnorr(