lambdaworks
lambdaworks copied to clipboard
Bit shifting for unsigned integer doubling
Description
Changes doubling logic for unsigned integers from addition to bit shifting
Type of change
- [X] Optimization
Any benchmarks for comparison?
Answering myself from data in Slack:
Results for doubling an unsigned integer 10000000 times and assigning: Time elapsed in double() is: 810.752416ms (OLD) Time elapsed in double() is: 548.382958ms (NEW, CLONES) Time elapsed in double_in_place() is: 353.955042ms (NEW, IN PLACE)
@diegokingston I checked the failing pipeline. The tests pass fine, but codecov upload failed. I'm retrying to check if it's just a temporary service failure. Otherwise, I suspect it has to do with external contributors not being able to use our API key.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 72.07%. Comparing base (
9395981) to head (293185a). Report is 4 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #868 +/- ##
==========================================
+ Coverage 72.06% 72.07% +0.01%
==========================================
Files 149 149
Lines 33414 33427 +13
==========================================
+ Hits 24079 24092 +13
Misses 9335 9335
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.