-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[move-stdlib] Use vector::move_range inside vector, and evaluate perf…
…ormance / calibrate gas (#14862) ## Description Use vector::move_range inside of vector, to optimize `insert`, `remove`, `append`, `trim`. Extend aptos-move/e2e-benchmark/src/main.rs to track gas and gas/s, to allow for quick calibration. Adding workloads to txn-emitter to be able to use it throughput. Additionally add a missing `replace` method, which replaces value at particular index. Running on extended set of params: https://gist.github.com/igor-aptos/e8d4e21edcbc75dddcb9382d4e077665 Summary of the performance tests: - performance doesn't depend on the size of the values (unless they are primitive), as vector modifies only pointers to them. - operation depends very little on how many elements we need to move - moving 1000 elements (i.e. to insert into a vector 1000 elements from the end) is only (!!) 2x slower than moving 1 element, end-to-end. For gas calibration, on the variety of workloads, current implementation has decent variance. After tuning params to match the averages, variance seems much smaller.
- Loading branch information
1 parent
95e0d68
commit 5902ff0
Showing
15 changed files
with
870 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.