tiny-secp256k1
tiny-secp256k1 copied to clipboard
Two times speed regression between `2.2.2` and `2.2.3`
I've faced with the speed regression between version 2.2.2 and 2.2.3 for pointFromScalar
method.
Simple test:
import * as secp256k1 from 'tiny-secp256k1';
import crypto from 'crypto';
const bufs = Array(10_000).fill(undefined).map(() => crypto.randomBytes(32));
for (const buf of bufs) {
secp256k1.pointFromScalar(buf);
}
% time node tiny-222.js
node tiny-222.js 0,79s user 0,02s system 103% cpu 0,783 total
% time node tiny-223.js
node tiny-223.js 1,34s user 0,02s system 101% cpu 1,335 total
So at least pointFromScalar
method became two times slower.
Testing locally, #124
2.2.2
tiny-secp256k1 (WASM): 99.09 us/op (10091.34 op/s), ±1.19 %
2.2.3
tiny-secp256k1 (WASM): 176.99 us/op (5649.99 op/s), ±1.03 %
remove lowmemory (#124)
tiny-secp256k1 (WASM): 94.00 us/op (10638.65 op/s), ±1.37 %
Please check if there are any other regressions you care about.
-
pointAddScalar
method has less regression1,28s
->1,58s
-
pointMultiply
it shows slightly better performance on 2.2.31,49s
->1,44s