aboutsummaryrefslogtreecommitdiff
path: root/test/ec/perf_mod.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/ec/perf_mod.py')
-rwxr-xr-xtest/ec/perf_mod.py12
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__":