There are several reasons to prefer clang-cl over MSVC, such as improved security and performance.
Below are the benchmark results for the master branch @ 201b2b8f06eb2daa5342c1fe5a14cb9934773cc3:
- using MSVC:
0Benchmark , Min(us) , Avg(us) , Max(us)
1
2ecdsa_verify , 66.0 , 71.0 , 113.0
3ecdsa_sign , 37.0 , 37.1 , 37.5
4ec_keygen , 28.5 , 28.9 , 29.0
5ecdh , 66.0 , 66.2 , 67.0
6ecdsa_recover , 67.0 , 74.9 , 123.0
7schnorrsig_sign , 30.0 , 30.3 , 30.5
8schnorrsig_verify , 66.5 , 70.6 , 104.0
9ellswift_encode , 17.5 , 17.9 , 18.0
10ellswift_decode , 14.5 , 15.3 , 19.0
11ellswift_keygen , 55.0 , 56.4 , 63.5
12ellswift_ecdh , 72.5 , 73.5 , 79.5
- using clang-cl:
0Benchmark , Min(us) , Avg(us) , Max(us)
1
2ecdsa_verify , 41.0 , 47.5 , 100.0
3ecdsa_sign , 27.0 , 27.2 , 27.5
4ec_keygen , 19.0 , 19.3 , 19.5
5ecdh , 42.0 , 42.4 , 43.0
6ecdsa_recover , 41.5 , 45.7 , 80.0
7schnorrsig_sign , 20.0 , 20.5 , 20.5
8schnorrsig_verify , 41.5 , 45.5 , 77.5
9ellswift_encode , 13.0 , 13.0 , 13.0
10ellswift_decode , 10.0 , 10.4 , 10.5
11ellswift_keygen , 38.5 , 39.1 , 41.5
12ellswift_ecdh , 47.0 , 48.5 , 59.0
On my local machine, the “Release” build configuration:
- using MSVC:
0> .\build-msvc\bin\Release\bench.exe
1Benchmark , Min(us) , Avg(us) , Max(us)
2
3ecdsa_verify , 81.2 , 90.6 , 102.0
4ecdsa_sign , 46.5 , 48.6 , 52.9
5ec_keygen , 31.6 , 34.8 , 36.2
6ecdh , 73.0 , 76.4 , 79.5
7schnorrsig_sign , 32.1 , 34.4 , 35.8
8schnorrsig_verify , 74.6 , 76.2 , 79.8
9ellswift_encode , 33.4 , 34.0 , 34.8
10ellswift_decode , 14.9 , 15.5 , 17.1
11ellswift_keygen , 64.5 , 65.6 , 67.1
12ellswift_ecdh , 78.3 , 80.7 , 90.1
- using clang-cl:
0> .\build-clangcl\bin\Release\bench.exe
1Benchmark , Min(us) , Avg(us) , Max(us)
2
3ecdsa_verify , 40.3 , 40.6 , 40.9
4ecdsa_sign , 30.6 , 30.9 , 31.3
5ec_keygen , 21.2 , 21.3 , 21.5
6ecdh , 41.5 , 42.4 , 44.8
7schnorrsig_sign , 22.5 , 22.7 , 22.8
8schnorrsig_verify , 41.2 , 41.4 , 41.7
9ellswift_encode , 20.3 , 20.6 , 20.8
10ellswift_decode , 8.50 , 8.64 , 8.76
11ellswift_keygen , 41.7 , 42.0 , 42.4
12ellswift_ecdh , 45.1 , 45.5 , 46.3