constantine/tests/math
Mamy Ratsimbazafy 6c48975aee
Parallel Multi-Scalar-Multiplication (#226)
* try parallel reduction in batch add, but alas it's slower than custom chunking. Except maybe on arch with performance/efficiency cores

* initial impl of parallel MSM - scaling to debug, threads not woken fast enough

* improve comment [skip ci]

* skip top window when c divides the number of bits

* for some reason parallel-for loops scale on 5+ threads while spawn only on 2x threads. Thread wakeup issue?

* Add counters and timers to audit threadpool bottlenecks

* metrics and profiling fixes, (slower) latency hiding, activate tests

* fix thief thread trying to wake another before canceling its own sleep

* easier to sort metrics and parallel endomorphism application

* selective endomorphism acceleration

* some tuning

* spawn can handle compile-time literals, static and type parameters. Also introduce spawnAwaitable to await void procs

* improve MSM overview [skip ci]

* bench cleanup
2023-04-10 23:30:14 +02:00
..
support Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
vectors Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_bigints.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_bigints_mod_vs_gmp.nim Parallel for (#222) 2023-02-24 09:47:36 +01:00
t_bigints_mul_high_words_vs_gmp.nim Parallel for (#222) 2023-02-24 09:47:36 +01:00
t_bigints_mul_vs_gmp.nim Parallel for (#222) 2023-02-24 09:47:36 +01:00
t_bigints_multimod.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_ec_conversion.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_frobenius.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_ec_sage_bls12_377.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_ec_sage_bls12_381.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_ec_sage_bn254_nogami.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_ec_sage_bn254_snarks.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_ec_sage_bw6_761_g1.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_ec_sage_bw6_761_g2.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_ec_sage_pallas.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_ec_sage_template.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_ec_sage_vesta.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_ec_shortw_jac_g1_add_double.nim Pasta curves (#191) 2022-04-27 00:58:48 +02:00
t_ec_shortw_jac_g1_mixed_add.nim Pasta curves (#191) 2022-04-27 00:58:48 +02:00
t_ec_shortw_jac_g1_msm.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_ec_shortw_jac_g1_mul_distri.nim Pasta curves (#191) 2022-04-27 00:58:48 +02:00
t_ec_shortw_jac_g1_mul_sanity.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_ec_shortw_jac_g1_mul_vs_ref.nim Pasta curves (#191) 2022-04-27 00:58:48 +02:00
t_ec_shortw_jac_g1_sum_reduce.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_ec_shortw_jac_g2_add_double_bls12_377.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_jac_g2_add_double_bls12_381.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_jac_g2_add_double_bn254_snarks.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_jac_g2_add_double_bw6_761.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_jac_g2_mixed_add_bls12_377.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_jac_g2_mixed_add_bls12_381.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_jac_g2_mixed_add_bn254_snarks.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_jac_g2_mixed_add_bw6_761.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_jac_g2_mul_distri_bls12_377.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_jac_g2_mul_distri_bls12_381.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_jac_g2_mul_distri_bn254_snarks.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_jac_g2_mul_distri_bw6_761.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_jac_g2_mul_sanity_bls12_377.nim chore: cleanup TODOs, unused constants 2023-01-12 01:27:23 +01:00
t_ec_shortw_jac_g2_mul_sanity_bls12_381.nim chore: cleanup TODOs, unused constants 2023-01-12 01:27:23 +01:00
t_ec_shortw_jac_g2_mul_sanity_bn254_snarks.nim chore: cleanup TODOs, unused constants 2023-01-12 01:27:23 +01:00
t_ec_shortw_jac_g2_mul_sanity_bw6_761.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_jac_g2_mul_vs_ref_bls12_377.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_jac_g2_mul_vs_ref_bls12_381.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_jac_g2_mul_vs_ref_bn254_snarks.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_jac_g2_mul_vs_ref_bw6_761.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_jacext_g1_add_double.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_ec_shortw_jacext_g1_mixed_add.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_ec_shortw_jacext_g1_sum_reduce.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_ec_shortw_prj_edge_cases.nim chore: remove stew/byteutils dependencies and unneeded imports 2023-01-12 20:25:57 +01:00
t_ec_shortw_prj_g1_add_double.nim Pasta curves (#191) 2022-04-27 00:58:48 +02:00
t_ec_shortw_prj_g1_mixed_add.nim Pasta curves (#191) 2022-04-27 00:58:48 +02:00
t_ec_shortw_prj_g1_msm.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_ec_shortw_prj_g1_mul_distri.nim Pasta curves (#191) 2022-04-27 00:58:48 +02:00
t_ec_shortw_prj_g1_mul_sanity.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_ec_shortw_prj_g1_mul_vs_ref.nim Pasta curves (#191) 2022-04-27 00:58:48 +02:00
t_ec_shortw_prj_g1_sum_reduce.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_ec_shortw_prj_g2_add_double_bls12_377.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_prj_g2_add_double_bls12_381.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_prj_g2_add_double_bn254_snarks.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_prj_g2_add_double_bw6_761.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_prj_g2_mixed_add_bls12_377.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_prj_g2_mixed_add_bls12_381.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_prj_g2_mixed_add_bn254_snarks.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_prj_g2_mixed_add_bw6_761.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_prj_g2_mul_distri_bls12_377.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_prj_g2_mul_distri_bls12_381.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_prj_g2_mul_distri_bn254_snarks.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_prj_g2_mul_distri_bw6_761.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_prj_g2_mul_sanity_bls12_377.nim chore: cleanup TODOs, unused constants 2023-01-12 01:27:23 +01:00
t_ec_shortw_prj_g2_mul_sanity_bls12_381.nim chore: cleanup TODOs, unused constants 2023-01-12 01:27:23 +01:00
t_ec_shortw_prj_g2_mul_sanity_bn254_snarks.nim chore: cleanup TODOs, unused constants 2023-01-12 01:27:23 +01:00
t_ec_shortw_prj_g2_mul_sanity_bw6_761.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_prj_g2_mul_vs_ref_bls12_377.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_prj_g2_mul_vs_ref_bls12_381.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_prj_g2_mul_vs_ref_bn254_snarks.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_shortw_prj_g2_mul_vs_ref_bw6_761.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_subgroups_bls12_377.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_subgroups_bls12_381.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_subgroups_bn254_nogami.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_subgroups_bn254_snarks.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_template.nim Parallel Multi-Scalar-Multiplication (#226) 2023-04-10 23:30:14 +02:00
t_ec_twedwards_prj_add_double.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_twedwards_prj_mul_distri.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_twedwards_prj_mul_sanity.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_ec_twedwards_prj_mul_vs_ref.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_finite_fields.nim Constant time (#185) 2022-02-28 09:23:26 +01:00
t_finite_fields.nim.cfg Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_finite_fields_conditional_arithmetic.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_finite_fields_double_precision.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_finite_fields_double_precision.nim.cfg Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_finite_fields_mulsquare.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_finite_fields_mulsquare.nim.cfg Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_finite_fields_powinv.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_finite_fields_powinv.nim.cfg Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_finite_fields_sqrt.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_finite_fields_sqrt.nim.cfg Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_finite_fields_vs_gmp.nim Parallel for (#222) 2023-02-24 09:47:36 +01:00
t_fp2.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_fp2_frobenius.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_fp2_sqrt.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_fp4.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_fp4_frobenius.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_fp6_bls12_377.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_fp6_bls12_381.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_fp6_bn254_nogami.nim Fp12 over fp6 (#201) 2022-08-14 09:48:10 +02:00
t_fp6_bn254_snarks.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_fp6_bw6_761.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_fp6_frobenius.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_fp12_anti_regression.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_fp12_bls12_377.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_fp12_bls12_381.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_fp12_bn254_nogami.nim Fp12 over fp6 (#201) 2022-08-14 09:48:10 +02:00
t_fp12_bn254_snarks.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_fp12_exponentiation.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_fp12_frobenius.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_fp_cubic_root.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_fp_tower_frobenius_template.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_fp_tower_template.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_fr.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_io_bigints.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_io_fields.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_io_fields.nim.cfg Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00
t_io_unsaturated.nim Parallel for (#222) 2023-02-24 09:47:36 +01:00
t_pairing_bls12_377_gt_subgroup.nim BLS Aggregate and Batch verify (#214) 2023-01-27 00:42:12 +01:00
t_pairing_bls12_377_line_functions.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_pairing_bls12_377_multi.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_pairing_bls12_377_optate.nim BLS Aggregate and Batch verify (#214) 2023-01-27 00:42:12 +01:00
t_pairing_bls12_381_gt_subgroup.nim BLS Aggregate and Batch verify (#214) 2023-01-27 00:42:12 +01:00
t_pairing_bls12_381_line_functions.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_pairing_bls12_381_multi.nim BLS Aggregate and Batch verify (#214) 2023-01-27 00:42:12 +01:00
t_pairing_bls12_381_optate.nim BLS Aggregate and Batch verify (#214) 2023-01-27 00:42:12 +01:00
t_pairing_bn254_nogami_gt_subgroup.nim BLS Aggregate and Batch verify (#214) 2023-01-27 00:42:12 +01:00
t_pairing_bn254_nogami_multi.nim BLS Aggregate and Batch verify (#214) 2023-01-27 00:42:12 +01:00
t_pairing_bn254_nogami_optate.nim BLS Aggregate and Batch verify (#214) 2023-01-27 00:42:12 +01:00
t_pairing_bn254_snarks_gt_subgroup.nim BLS Aggregate and Batch verify (#214) 2023-01-27 00:42:12 +01:00
t_pairing_bn254_snarks_multi.nim BLS Aggregate and Batch verify (#214) 2023-01-27 00:42:12 +01:00
t_pairing_bn254_snarks_optate.nim BLS Aggregate and Batch verify (#214) 2023-01-27 00:42:12 +01:00
t_pairing_bw6_761_gt_subgroup.nim BLS Aggregate and Batch verify (#214) 2023-01-27 00:42:12 +01:00
t_pairing_bw6_761_optate.nim BLS Aggregate and Batch verify (#214) 2023-01-27 00:42:12 +01:00
t_pairing_cyclotomic_subgroup.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_pairing_mul_fp12_by_lines.nim move staticFor to the inner repo, not helpers/ for unblocking nimble install (#216) 2023-02-07 13:11:44 +01:00
t_pairing_template.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_primitives.nim Multi-Scalar-Multiplication / Linear combination (#220) 2023-02-16 12:45:05 +01:00
t_primitives_extended_precision.nim Don't dump all in "backend" (#184) 2022-02-27 01:49:08 +01:00