Replies: 2 comments 8 replies
-
What are the absolute times we're talking about here? A 50% increase in execution times on the order of nanoseconds is basically a meaningless statistic - we need to know what the baseline time and standard deviation for each run is. I wouldn't be surprised if async is too expensive to make the default - but I'm not convinced by what you've laid out here without further context to the numbers. A couple of other thoughts:
I don't know that we can draw any conclusions about our approach just yet. |
Beta Was this translation helpful? Give feedback.
-
Thank you for putting these together! A few initial observations/comments:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The main outcome of the call last week was to benchmark the cost of having the fast processor be async. The idea was that if it turns out that async is cheap then we could have the fast processor's async implementation be first class (and optionally provide a sync API that calls the async, perhaps using
tokio::runtime::block_on
.I ran the
blake3_1to1
,blake3_2to1
andsha256
benchmarks for the following three scenarios:FastProcessor::execute()
is madeasync
; everything else remainssync
execute_mast_node()
and its first-level children were madeasync
MastNode
is done executing. This would be needed e.g. in cases where the VM runs in the same thread that updates the UI.Results
Baseline timings (on
next
):- blake3_1to1: 1.73ms
- blake3_2to1: 25us
- sha256: 60us
Number of cycles for each benchmark:
- blake3_1to1: 485k cycles
- blake3_2to1: 4.8k cycles
- sha256: 17k cycles
The results are as followed. Each is presented as a performance diff compared with the latest
next
branch. For example,+ 10%
means that the scenario being benchmarked is 10% slower than the current (sync) implementation innext
.Scenario 1
Scenario 2
Scenario 3
Conclusion
Clearly, the performance hit is important enough so that we cannot afford to use
async
when maximal performance is required (and interactivity isn't required).Beta Was this translation helpful? Give feedback.
All reactions