Skip to content

Two times speed regression between 2.2.2 and 2.2.3 #123

Open
@mahnunchik

Description

@mahnunchik

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions