-
Notifications
You must be signed in to change notification settings - Fork 8
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
Moc inline with new meter alloc #85
Conversation
Map
Priority queue
Growable array
Statistics
SHA-2
Certified map
Statistics
Basic DAO
DIP721 NFT
Statistics
Heartbeat
Timer
Statistics
Garbage Collection
Actor class
Statistics
Publisher & Subscriber
Statistics
Overall Statistics
|
Collection librariesMeasure different collection libraries written in both Motoko and Rust. We use the same random number generator with fixed seed to ensure that all collections contain
💎 Takeaways
Map
Priority queue
Growable array
Cryptographic librariesMeasure different cryptographic libraries written in both Motoko and Rust.
SHA-2
Certified map
Sample DappsMeasure the performance of some typical dapps:
Basic DAO
DIP721 NFT
Heartbeat / TimerMeasure the cost of empty heartbeat and timer job.
Heartbeat
Timer
Motoko Specific BenchmarksMeasure various features only available in Motoko.
Garbage Collection
Actor class
Publisher & SubscriberMeasure the cost of inter-canister calls from the Publisher & Subscriber example.
|
…h-new-meter-alloc
To mitigate cycle perf regression of new cost model, selectively inline `share_code` helpers in the backend using an additional argument `Never | Always` (i.e. always inline vs never inline). Also, add compiler flags to explicitly opt-in or disable the inlining optimization. NB: some recursive share_code cannot be unshared/inlined (e.g. recursive serialization code and code that explicitly returns rather than returning control flow). Similar to #4207, but also inlines all heap object allocation and adds compiler flags to enable (default)/disable the optimization. Note users may want to disable the optimization if they can't accept the increase in code size. # Profiling data ## new metering, sans wasm-opt dfinity/canister-profiling#85 Overall Statistics binary_size: 10.68% [8.58%, 12.79%] max_mem: no change cycles: -8.32% [-9.67%, -6.97%] ## new metering with wasm-opt 03 dfinity/canister-profiling#86 Overall Statistics binary_size: -6.28% [-7.53%, -5.03%] max_mem: no change cycles: -18.21% [-20.07%, -16.36%] ## new metering, master (no-inlining) and wasm-opt 03 dfinity/canister-profiling#83 Overall Statistics binary_size: -13.96% [-14.64%, -13.28%] max_mem: no change cycles: -12.46% [-13.51%, -11.41%] (UPDATE: revised stats after @chenyan-dfinity updates to PRs)
base: new meter; no wasm-opt; selective inlining including allocation
cf. #80