Skip to content

Update blst to 0.3.5

Danny Willems requested to merge update-blst-to-0.3.5 into master

After:

> dune exec ./benchmark/bench_fr.exe
Estimated testing time 1m40s (10 benchmarks x 10s). Change using '-quota'.
┌───────────────────┬──────────────┬────────────┬──────────┬──────────┬────────────┐
│ Name              │     Time/Run │    mWd/Run │ mjWd/Run │ Prom/Run │ Percentage │
├───────────────────┼──────────────┼────────────┼──────────┼──────────┼────────────┤
│ Addition Fr       │      96.88ns │     18.00w │          │          │      0.05% │
│ Multiplication Fr │     112.17ns │     18.00w │          │          │      0.06% │
│ Opposite Fr       │      94.75ns │     18.00w │          │          │      0.05% │
│ Substraction Fr   │      94.48ns │     18.00w │          │          │      0.05% │
│ Square Fr         │     109.85ns │     18.00w │          │          │      0.06% │
│ Inverse Fr        │   2_611.11ns │     76.00w │          │          │      1.45% │
│ Pow Fr            │ 180_268.26ns │ 27_686.62w │  115.18w │  115.18w │    100.00% │
│ Double Fr         │     111.11ns │     18.00w │          │          │      0.06% │
│ of_bytes_exn Fr   │     339.33ns │     48.00w │          │          │      0.19% │
│ to_bytes Fr       │     201.01ns │     28.00w │          │          │      0.11% │
└───────────────────┴──────────────┴────────────┴──────────┴──────────┴────────────┘
> dune exec ./benchmark/bench_g1.exe
Estimated testing time 1m30s (9 benchmarks x 10s). Change using '-quota'.
┌───────────────────────────────┬──────────────┬─────────┬────────────┐
│ Name                          │     Time/Run │ mWd/Run │ Percentage │
├───────────────────────────────┼──────────────┼─────────┼────────────┤
│ Multiplication on G1          │ 117_728.48ns │  53.00w │    100.00% │
│ Double on G1                  │     564.87ns │  18.00w │      0.48% │
│ Addition on G1                │   1_072.97ns │  18.00w │      0.91% │
│ Negate on G1                  │     391.80ns │ 198.01w │      0.33% │
│ of_bytes_exn on G1            │  72_568.01ns │  42.00w │     61.64% │
│ to_bytes on G1                │   3_949.87ns │  18.00w │      3.36% │
│ of_compressed_bytes_exn on G1 │  90_500.27ns │  42.00w │     76.87% │
│ to_compressed_bytes on G1     │   3_824.33ns │  12.00w │      3.25% │
│ hash_to_curve on G1           │  80_196.30ns │  36.00w │     68.12% │
└───────────────────────────────┴──────────────┴─────────┴────────────┘
> dune exec ./benchmark/bench_g2.exe
Estimated testing time 1m30s (9 benchmarks x 10s). Change using '-quota'.
┌───────────────────────────────┬──────────────┬─────────┬────────────┐
│ Name                          │     Time/Run │ mWd/Run │ Percentage │
├───────────────────────────────┼──────────────┼─────────┼────────────┤
│ Multiplication on G2          │ 247_360.89ns │  53.00w │     95.88% │
│ Double on G2                  │   1_154.57ns │  18.00w │      0.45% │
│ Addition on G2                │   2_809.71ns │  18.00w │      1.09% │
│ Negate on G2                  │     396.17ns │ 198.01w │      0.15% │
│ of_bytes_exn on G2            │  83_089.02ns │  42.00w │     32.20% │
│ to_bytes on G2                │   4_657.92ns │  30.00w │      1.81% │
│ of_compressed_bytes_exn on G2 │ 119_478.20ns │  42.00w │     46.31% │
│ to_compressed_bytes on G2     │   4_534.59ns │  18.00w │      1.76% │
│ hash_to_curve on G2           │ 258_001.34ns │  36.00w │    100.00% │
└───────────────────────────────┴──────────────┴─────────┴────────────┘
> dune exec ./benchmark/bench_pairing.exe
Estimated testing time 50s (5 benchmarks x 10s). Change using '-quota'.
┌───────────────────────────────────────────────────────────────────────┬────────────┬─────────┬────────────┐
│ Name                                                                  │   Time/Run │ mWd/Run │ Percentage │
├───────────────────────────────────────────────────────────────────────┼────────────┼─────────┼────────────┤
│ Pairing                                                               │   926.40us │  72.00w │     31.17% │
│ Miller loop simple                                                    │   924.45us │  72.00w │     31.11% │
│ Final exponentiation                                                  │   521.83us │  18.00w │     17.56% │
│ Miller loop on 6 couples of points                                    │ 2_442.65us │ 432.02w │     82.20% │
│ Miller loop on 6 couples of points followed by a final exponentiation │ 2_971.73us │ 450.02w │    100.00% │
└───────────────────────────────────────────────────────────────────────┴────────────┴─────────┴────────────┘

Before:

> dune exec ./benchmark/bench_fr.exe
Estimated testing time 1m40s (10 benchmarks x 10s). Change using '-quota'.
┌───────────────────┬──────────────┬────────────┬──────────┬──────────┬────────────┐
│ Name              │     Time/Run │    mWd/Run │ mjWd/Run │ Prom/Run │ Percentage │
├───────────────────┼──────────────┼────────────┼──────────┼──────────┼────────────┤
│ Addition Fr       │      83.97ns │     18.00w │          │          │      0.05% │
│ Multiplication Fr │     105.53ns │     18.00w │          │          │      0.06% │
│ Opposite Fr       │      87.62ns │     18.00w │          │          │      0.05% │
│ Substraction Fr   │      83.75ns │     18.00w │          │          │      0.05% │
│ Square Fr         │     100.56ns │     18.00w │          │          │      0.06% │
│ Inverse Fr        │   2_519.35ns │     76.00w │          │          │      1.48% │
│ Pow Fr            │ 169_669.99ns │ 27_686.63w │  115.30w │  115.30w │    100.00% │
│ Double Fr         │      86.40ns │     18.00w │          │          │      0.05% │
│ of_bytes_exn Fr   │     275.73ns │     48.00w │          │          │      0.16% │
│ to_bytes Fr       │     197.29ns │     28.00w │          │          │      0.12% │
└───────────────────┴──────────────┴────────────┴──────────┴──────────┴────────────┘


> dune exec ./benchmark/bench_g1.exe     
Estimated testing time 1m30s (9 benchmarks x 10s). Change using '-quota'.
┌───────────────────────────────┬──────────────┬─────────┬────────────┐
│ Name                          │     Time/Run │ mWd/Run │ Percentage │
├───────────────────────────────┼──────────────┼─────────┼────────────┤
│ Multiplication on G1          │ 117_458.14ns │  53.00w │    100.00% │
│ Double on G1                  │     553.77ns │  18.00w │      0.47% │
│ Addition on G1                │   1_060.97ns │  18.00w │      0.90% │
│ Negate on G1                  │     363.34ns │ 198.01w │      0.31% │
│ of_bytes_exn on G1            │  73_659.55ns │  42.00w │     62.71% │
│ to_bytes on G1                │   3_940.76ns │  18.00w │      3.36% │
│ of_compressed_bytes_exn on G1 │  90_420.89ns │  42.00w │     76.98% │
│ to_compressed_bytes on G1     │   3_867.61ns │  12.00w │      3.29% │
│ hash_to_curve on G1           │  80_547.50ns │  36.00w │     68.58% │
└───────────────────────────────┴──────────────┴─────────┴────────────┘

> dune exec ./benchmark/bench_g2.exe
Estimated testing time 1m30s (9 benchmarks x 10s). Change using '-quota'.
┌───────────────────────────────┬──────────────┬─────────┬────────────┐
│ Name                          │     Time/Run │ mWd/Run │ Percentage │
├───────────────────────────────┼──────────────┼─────────┼────────────┤
│ Multiplication on G2          │ 232_607.56ns │  53.00w │     91.23% │
│ Double on G2                  │   1_089.25ns │  18.00w │      0.43% │
│ Addition on G2                │   2_653.73ns │  18.00w │      1.04% │
│ Negate on G2                  │     413.55ns │ 198.01w │      0.16% │
│ of_bytes_exn on G2            │  83_075.80ns │  42.00w │     32.58% │
│ to_bytes on G2                │   4_697.23ns │  30.00w │      1.84% │
│ of_compressed_bytes_exn on G2 │ 118_055.10ns │  42.00w │     46.30% │
│ to_compressed_bytes on G2     │   4_577.12ns │  18.00w │      1.80% │
│ hash_to_curve on G2           │ 254_957.30ns │  36.00w │    100.00% │
└───────────────────────────────┴──────────────┴─────────┴────────────┘


> dune exec ./benchmark/bench_pairing.exe
Estimated testing time 50s (5 benchmarks x 10s). Change using '-quota'.
┌───────────────────────────────────────────────────────────────────────┬────────────┬─────────┬────────────┐
│ Name                                                                  │   Time/Run │ mWd/Run │ Percentage │
├───────────────────────────────────────────────────────────────────────┼────────────┼─────────┼────────────┤
│ Pairing                                                               │   927.27us │  72.00w │     31.52% │
│ Miller loop simple                                                    │   920.56us │  72.00w │     31.29% │
│ Final exponentiation                                                  │   524.50us │  18.00w │     17.83% │
│ Miller loop on 6 couples of points                                    │ 2_403.75us │ 432.02w │     81.71% │
│ Miller loop on 6 couples of points followed by a final exponentiation │ 2_941.94us │ 450.02w │    100.00% │
└───────────────────────────────────────────────────────────────────────┴────────────┴─────────┴────────────┘
Edited by Danny Willems

Merge request reports