Git Product home page Git Product logo

Comments (5)

tarcieri avatar tarcieri commented on July 22, 2024 2

Nice sleuthing! This makes me want to set up something like https://github.com/bencherdev/bencher to watch for these sorts of regressions.

I'll have to see if I can spot how this impacted codegen.

from elliptic-curves.

tarcieri avatar tarcieri commented on July 22, 2024

The biggest change was probably switching to the generic curve arithmetic implementation in the primeorder crate. Perhaps that impacted inlining?

from elliptic-curves.

randombit avatar randombit commented on July 22, 2024

I didn't have much luck bisecting so I wrote a script that just benchmarks every commit

#!/usr/bin/python

import subprocess
import re
import sys

def run_command(cmdline, cwd=None):
    proc = subprocess.run(cmdline, cwd=cwd, capture_output=True)
    return proc.stdout.decode('utf8')

time = re.compile(' +time: +\[(.*)\]')

for commit in open('p256_commits'):
    commit = commit.strip()
    run_command(['git', 'checkout', commit])
    at_commit = run_command(['git', 'rev-parse', 'HEAD']).strip()

    assert(commit == at_commit)

    output = run_command(['cargo', 'bench', 'point-'], cwd='p256')

    for line in output.split('\n'):
        m = time.match(line)
        if m:
            print(commit, m.group(1))
            break

    sys.stdout.flush()

where p256_commits contains the ID for every commit between 0.11.1 and HEAD that touched p256:

$ git log p256/v0.11.1.. p256 | grep ^commit | cut -c 8- > p256_commits

My results from this seem to implicate especially cea8f60, across two runs there is clear jump there

cea8f60ff76ba4f447a5169b9fb44f788b1217c4 149.26 µs 149.72 µs 150.16 µs
f1878f985211937b25308401ba64154256f3d308 129.89 µs 130.30 µs 130.73 µs

and

cea8f60ff76ba4f447a5169b9fb44f788b1217c4 150.13 µs 150.64 µs 151.20 µs
f1878f985211937b25308401ba64154256f3d308 130.01 µs 130.49 µs 131.02 µs

from elliptic-curves.

tarcieri avatar tarcieri commented on July 22, 2024

I opened #885 which might address this issue

from elliptic-curves.

tarcieri avatar tarcieri commented on July 22, 2024

I think this is addressed now?

from elliptic-curves.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.