lambdaworks icon indicating copy to clipboard operation
lambdaworks copied to clipboard

Bit shifting for unsigned integer doubling

Open irfanbozkurt opened this issue 1 year ago • 2 comments
trafficstars

Description

Changes doubling logic for unsigned integers from addition to bit shifting

Type of change

  • [X] Optimization

irfanbozkurt avatar Apr 29 '24 22:04 irfanbozkurt

Any benchmarks for comparison?

Oppen avatar Apr 30 '24 16:04 Oppen

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)

Oppen avatar Apr 30 '24 20:04 Oppen

@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.

Oppen avatar Aug 15 '24 19:08 Oppen

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.

codecov-commenter avatar Aug 15 '24 19:08 codecov-commenter