Use intops-powered Stint and bncurve, introduce intops a new dependency#3956
Use intops-powered Stint and bncurve, introduce intops a new dependency#3956
Conversation
|
I did local benchmarks (thanks to @advaita-saha) on ≈2kk blocks, compared master vs feature/stint_bncurve_with_intops: Not sure how to interpret those results. 1.85 % slowdown may well be a random fluctuation (I'm running the import on a regular laptop, with other tasks running concurrently, which could affect the results). @tersec should I run a larger import? |
|
Run till 3.5M blocks I would suggest |
Agree. The earlier blocks qualitatively differ because people hadn't been using the network as much. But also yes, laptops require significant effort to transform into stable benchmarking platforms. 1.85% is enough to at least investigate the extent to which it might (or might not) represent random noise/fluctuations, because while it's not enormous, running 1.85% slower due to an integer library change isn't necessarily worthwhile. Furthermore, those benchmarks involve the entire block processing pipeline, which involves many tasks which don't run through |
|
OK I did the 1-hour, 3.5kk block benchmark. It's still local, still run on a regular laptop but I tried my best to minimize foreign influences , almost didn't touch the keyboard the entire time. The results: As before, I'm not sure how to interpret that. To me, smaller diff on a longer bench and the fact that the diff is <1% indicate that the two solutions converge performance-wise, i.e. we're not observing a true performance drop and the diff could be attributed to randomness associated with local environment. However, I may be entirely wrong and a 0.86% drop would be considered unacceptable for Nimbus. Would love to know your thoughts on that. |
@tersec Could you please suggest ways to benchmark the parts that do involve stint in isolation? I agree that if the measurements are accurate, a small drop in overall performance could indicate a larger drop in the arithmetic-heavy part. If there's a way to check that, I'd definitely do it. |
|
I did another run of the benchmarks and this time the new version is actually 1.31% better: IMO that's a strong indication that the performance was not affected by the switch to intops. I'll mark the PR as ready for review. If I get the approvals, I'll merge the stint and bncurve PRs, update this one to point to the main version and not my forks, and merge this one as well. |
…on, not forks. The forks have been merged to the upstream repos, so this is no longer needed. - status-im/nim-stint#170 - status-im/nim-bncurve#16
Stint and bncurve are migrating to the new intops library:
The tests pass, the benchmarks are good (some even got better).
However, we need to validate that no projects depending in Stint or bncurve break with this change.
This PR introduces the new versions of Stint and bncurve that use intops as well as adds intops itself as a dependency.