mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-06 11:48:24 +00:00
Kotlin generates Intrinsics.checkNotNullParameter at the entry of every function taking non-null reference types. Bytecode audit showed: Before: 128 checkNotNullParameter calls across secp256k1 classes After: 8 (only expression-value checks in non-hot paths) Per Schnorr verify, this eliminates ~4,000+ invokestatic calls. On ART (~2-3ns each): saves ~8-12μs per verify. On HotSpot: neutral (C2 already optimizes null checks to fast branches). These flags are safe for this module: all internal secp256k1 functions use non-null LongArray/MutablePoint parameters that are never null. Applied at the module level (compilerOptions) so all targets benefit. https://claude.ai/code/session_01EMY5RnXb9rnsyU2KbXrSaY