diff options
| author | J08nY | 2025-03-29 19:06:49 +0100 |
|---|---|---|
| committer | J08nY | 2025-03-29 19:06:49 +0100 |
| commit | 5b4e0f2687065864f3945c25d118518957e3f1ee (patch) | |
| tree | 0e708b8f2993f8da136ea6c7d9b2a52e72bee06d | |
| parent | 87ceaa26009266a429352aa11bac586cb4bf5132 (diff) | |
| download | pyecsca-5b4e0f2687065864f3945c25d118518957e3f1ee.tar.gz pyecsca-5b4e0f2687065864f3945c25d118518957e3f1ee.tar.zst pyecsca-5b4e0f2687065864f3945c25d118518957e3f1ee.zip | |
| -rwxr-xr-x | test/ec/perf_mod.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ec/perf_mod.py b/test/ec/perf_mod.py index 4bd1e1e..ac84a39 100755 --- a/test/ec/perf_mod.py +++ b/test/ec/perf_mod.py @@ -105,6 +105,18 @@ def main(profiler, mod, operations, directory): ): for _ in range(operations): Mod.random(n) + click.echo(f"Profiling {operations} {n.bit_length()}-bit cubic residue checks...") + with Profiler( + profiler, directory, f"mod_256b_iscubicresidue_{operations}_{mod}", operations + ): + for _ in range(operations): + a.is_cubic_residue() + click.echo(f"Profiling {operations} {n.bit_length()}-bit cubic roots...") + with Profiler( + profiler, directory, f"mod_256b_cuberoot_{operations}_{mod}", operations + ): + for _ in range(operations): + b.cube_root() if __name__ == "__main__": |
