Files
amethyst/quartz
Claude 2f5152efd6 bench: add native C-to-C benchmark vs ACINQ libsecp256k1
Direct comparison with no JNI/JVM overhead, both libraries called
from the same C program on the same machine (x86_64, BMI2).

Results (x86_64, same machine, cached pubkey pattern):
  Operation                  ACINQ     Ours    Speedup
  pubkeyCreate               21.2µs   20.3µs    1.04x
  signSchnorr                23.5µs   39.3µs    0.60x (*)
  verify (BIP-340)           42.8µs   46.8µs    0.91x
  verifyFast (Nostr)         42.8µs   39.1µs    1.10x
  ECDH (cached)              44.4µs   39.7µs    1.12x
  batch(200)                 47.2µs   10.1µs    4.7x per event

(*) sign is slower because ACINQ's keypair API pre-stores the pubkey,
avoiding ecmult_gen during sign. Our API derives pubkey each time.
A keypair-style API would match ACINQ's sign performance.

Cross-verification confirms both produce compatible signatures.

https://claude.ai/code/session_011KVZhDcV2G7idNWEBz12GY
2026-04-11 11:47:19 +00:00
..