Skip to content

Commit

Permalink
Fix perf.
Browse files Browse the repository at this point in the history
  • Loading branch information
J08nY committed Jul 15, 2024
1 parent 30d5254 commit ac4b70b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/ec/perf_mod.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
import click

from pyecsca.ec.mod import Mod
from pyecsca.ec.mod import Mod, mod as make_mod
from pyecsca.ec.mod.gmp import has_gmp
from pyecsca.ec.mod.flint import has_flint
from pyecsca.misc.cfg import TemporaryConfig
Expand All @@ -28,8 +28,8 @@ def main(profiler, mod, operations, directory):
with TemporaryConfig() as cfg:
cfg.ec.mod_implementation = mod
n = 0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF
a = Mod(0x11111111111111111111111111111111, n)
b = Mod(0xBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB, n)
a = make_mod(0x11111111111111111111111111111111, n)
b = make_mod(0xBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB, n)
click.echo(f"Profiling {operations} {n.bit_length()}-bit modular inverse...")
with Profiler(profiler, directory, f"mod_256b_inverse_{operations}_{mod}"):
for _ in range(operations):
Expand Down

0 comments on commit ac4b70b

Please sign in to comment.