[go: nahoru, domu]

Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

optimize extract_unaligned_uint128 #157

Merged
merged 1 commit into from
Dec 16, 2021

Conversation

temyurchenko
Copy link
Contributor

Profiling BaseJumpRateModelV2.utilizationRate has shown that ~37% of
steps are spent inside of extract_unaligned_uint128, in
particular uint256 multiplication. We remove uint256 operations
and instead use bitwise operations and masks to perform the
extraction. It results in almost universal ~25-30% reduction in
the number of steps.

@temyurchenko temyurchenko force-pushed the murcake/optimize-extract_unaligned_uint128 branch 2 times, most recently from 3e32466 to 11fad77 Compare December 15, 2021 09:35
Profiling `BaseJumpRateModelV2.utilizationRate` has shown that ~37% of
     steps are spent inside of `extract_unaligned_uint128`, in
     particular uint256 multiplication. We remove uint256 operations
     and instead use bitwise operations and masks to perform the
     extraction. It results in almost universal ~25-30% reduction in
     the number of steps.
@temyurchenko temyurchenko force-pushed the murcake/optimize-extract_unaligned_uint128 branch from 11fad77 to 9faee9e Compare December 15, 2021 09:40
Copy link
Contributor
@swapnilraj swapnilraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really good!

@temyurchenko temyurchenko merged commit ddc9d6a into develop Dec 16, 2021
@temyurchenko temyurchenko deleted the murcake/optimize-extract_unaligned_uint128 branch December 16, 2021 12:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants