Skip to content

Conversation

arnetheduck
Copy link
Member

  • prefer stew/staticfor
  • cleanup pragmas
  • unroll a few more things

These simplifications also bring a nice little 10-15% perf boost:

arnetheduck@praeceps:~/status/nimbus-eth1/vendor/nim-bncurve$
/home/arnetheduck/status/nimbus-eth1/vendor/nim-bncurve/benchmarks/bench
G1 Jacobian add: 578 ns
G1 toAffine: 3067 ns
G2 Jacobian add: 3141 ns
G2 toAffine: 3772 ns
G1 Jacobian mul: 191442 ns
G2 Jacobian mul: 819047 ns
Pairing: 2111668 ns
arnetheduck@praeceps:~/status/nimbus-eth1/vendor/nim-bncurve$
/home/arnetheduck/status/nimbus-eth1/vendor/nim-bncurve/benchmarks/bench
G1 Jacobian add: 497 ns
G1 toAffine: 2774 ns
G2 Jacobian add: 2701 ns
G2 toAffine: 3461 ns
G1 Jacobian mul: 147267 ns
G2 Jacobian mul: 633992 ns
Pairing: 1816686 ns

* prefer stew/staticfor
* cleanup pragmas
* unroll a few more things

These simplifications also bring a nice little 10-15% perf boost:

```
arnetheduck@praeceps:~/status/nimbus-eth1/vendor/nim-bncurve$
/home/arnetheduck/status/nimbus-eth1/vendor/nim-bncurve/benchmarks/bench
G1 Jacobian add: 578 ns
G1 toAffine: 3067 ns
G2 Jacobian add: 3141 ns
G2 toAffine: 3772 ns
G1 Jacobian mul: 191442 ns
G2 Jacobian mul: 819047 ns
Pairing: 2111668 ns
arnetheduck@praeceps:~/status/nimbus-eth1/vendor/nim-bncurve$
/home/arnetheduck/status/nimbus-eth1/vendor/nim-bncurve/benchmarks/bench
G1 Jacobian add: 497 ns
G1 toAffine: 2774 ns
G2 Jacobian add: 2701 ns
G2 toAffine: 3461 ns
G1 Jacobian mul: 147267 ns
G2 Jacobian mul: 633992 ns
Pairing: 1816686 ns
```
@arnetheduck arnetheduck merged commit a1560b9 into master Dec 11, 2024
10 checks passed
@arnetheduck arnetheduck deleted the arith-cleanup branch December 11, 2024 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant