-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: use crate with MSM and turn on portable #154
Conversation
Perf results from herztner linux host without portable with portable
================ ================
PublicKey
✓ PublicKey serialization 3.142000 us/op 3.257000 us/op
✓ PublicKey deserialize 18.46600 us/op 19.09900 us/op
✓ PublicKey deserialize and validate - 1 keys 67.42900 us/op 84.52600 us/op
✓ PublicKey deserialize and validate - 100 keys 6.570816 ms/op 8.101886 ms/op
✓ PublicKey deserialize and validate - 10000 keys 694.4406 ms/op 754.5784 ms/op
SecretKey
✓ SecretKey.fromKeygen 3.149000 us/op 2.844000 us/op
✓ SecretKey serialization 2.480000 us/op 2.577000 us/op
✓ SecretKey deserialization 2.563000 us/op 2.456000 us/op
✓ SecretKey.toPublicKey 120.5220 us/op 115.8130 us/op
✓ SecretKey.sign 414.8980 us/op 471.9400 us/op
Signature
✓ Signature serialization 3.159000 us/op 3.510000 us/op
✓ Signature deserialize 33.20300 us/op 34.34500 us/op
✓ Signatures deserialize and validate - 1 sets 94.89100 us/op 97.31100 us/op
✓ Signatures deserialize and validate - 100 sets 10.07905 ms/op 9.350226 ms/op
✓ Signatures deserialize and validate - 10000 sets 986.1137 ms/op 981.0709 ms/op
functions
aggregatePublicKeys
✓ aggregatePublicKeys - 1 sets 2.332000 us/op 2.575000 us/op
✓ aggregatePublicKeys - 8 sets 12.61600 us/op 12.52400 us/op
✓ aggregatePublicKeys - 32 sets 30.97300 us/op 28.65100 us/op
✓ aggregatePublicKeys - 128 sets 115.9720 us/op 105.5620 us/op
✓ aggregatePublicKeys - 256 sets 204.6460 us/op 209.7040 us/op
aggregateSignatures
✓ aggregateSignatures - 1 sets 2.695000 us/op 2.711000 us/op
✓ aggregateSignatures - 8 sets 18.34300 us/op 21.04700 us/op
✓ aggregateSignatures - 32 sets 60.18400 us/op 69.99900 us/op
✓ aggregateSignatures - 128 sets 231.2630 us/op 248.3100 us/op
✓ aggregateSignatures - 256 sets 462.5010 us/op 485.4710 us/op
aggregateWithRandomness
✓ aggregateWithRandomness - 1 sets 234.0890 us/op 276.7920 us/op
✓ aggregateWithRandomness - 16 sets 2.381737 ms/op 3.680782 ms/op
✓ aggregateWithRandomness - 128 sets 15.50784 ms/op 17.89131 ms/op
✓ aggregateWithRandomness - 256 sets 32.66754 ms/op 30.74395 ms/op
✓ aggregateWithRandomness - 512 sets 61.95717 ms/op 57.96183 ms/op
✓ aggregateWithRandomness - 1024 sets 112.9946 ms/op 109.9115 ms/op
aggregateVerify
✓ aggregateVerify - 1 sets 1.253683 ms/op 1.389746 ms/op
✓ aggregateVerify - 8 sets 3.898257 ms/op 3.371304 ms/op
✓ aggregateVerify - 32 sets 8.667316 ms/op 8.427201 ms/op
✓ aggregateVerify - 128 sets 24.15127 ms/op 23.48762 ms/op
✓ aggregateVerify - 256 sets 40.40848 ms/op 40.25433 ms/op
verifyMultipleAggregateSignatures
✓ verifyMultipleAggregateSignatures - 1 sets 1.514626 ms/op 1.428105 ms/op
✓ verifyMultipleAggregateSignatures - 8 sets 4.652070 ms/op 4.788486 ms/op
✓ verifyMultipleAggregateSignatures - 32 sets 9.948129 ms/op 10.31866 ms/op
✓ verifyMultipleAggregateSignatures - 128 sets 30.71151 ms/op 29.48134 ms/op
✓ verifyMultipleAggregateSignatures - 256 sets 48.85230 ms/op 47.52506 ms/op
verifyMultipleAggregateSignatures same message
✓ Same message - 1 sets 1.434673 ms/op 1.482760 ms/op
✓ Same message - 8 sets 2.101413 ms/op 1.997373 ms/op
✓ Same message - 32 sets 4.335625 ms/op 4.336472 ms/op
✓ Same message - 128 sets 13.95897 ms/op 15.11741 ms/op
✓ Same message - 256 sets 25.63198 ms/o 26.69647 ms/opp |
Can you deploy this to a feature group? Would like to see what it looks with a real-world load first |
Results look good on |
Correct me if I'm wrong, but by enabling |
In the worst case that is correct. But so far the metrics look almost identical and the perf times for the library are almost identical so we may not need to publish two and default to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics look 👍
We don't need to maintain separate versions for portable/non-portable
Attempt to fix illegal instruction for celeron.
Perf results from without/with
portable
feature. Averaged the result from 4 runs with and 4 runs without for surety.Overall is a bit faster on my mac, and results below show perf on a linux host. Many are faster but a couple are slower, but they are small differences. The one that did jump out at me though is 5% slower aggregating signatures. However its 1% faster aggregating with randomness.
Think this is a smart change for compatibility and guessing the per difference will not be enough to warranty to separate distributions of Lodestar.