Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

avoid unnecessary empty arrays when binning #17944

Merged
merged 1 commit into from
Jun 16, 2021

Conversation

jeffwashington
Copy link
Contributor

@jeffwashington jeffwashington commented Jun 14, 2021

Problem

We can scan storages in bins to reduce dynamic memory usage. We store account info by bin.

Summary of Changes

Compact the bin arrays we use to only use the range of bins for this pass instead of all bins. This reduces memory use and useless iterating over empty array elements.
Fixes #

@jeffwashington jeffwashington force-pushed the range branch 3 times, most recently from 2ceb09a to 39e95a3 Compare June 14, 2021 21:35
@codecov
Copy link

codecov bot commented Jun 14, 2021

Codecov Report

❗ No coverage uploaded for pull request base (master@7fde9b6). Click here to learn what that means.
The diff coverage is 87.5%.

@@            Coverage Diff            @@
##             master   #17944   +/-   ##
=========================================
  Coverage          ?    82.6%           
=========================================
  Files             ?      431           
  Lines             ?   121318           
  Branches          ?        0           
=========================================
  Hits              ?   100262           
  Misses            ?    21056           
  Partials          ?        0           

@jeffwashington jeffwashington marked this pull request as ready for review June 15, 2021 04:20
@jeffwashington jeffwashington requested a review from sakridge June 15, 2021 04:20
@jeffwashington jeffwashington merged commit eee5414 into solana-labs:master Jun 16, 2021
mergify bot pushed a commit that referenced this pull request Jun 16, 2021
mergify bot added a commit that referenced this pull request Jun 16, 2021
(cherry picked from commit eee5414)

Co-authored-by: Jeff Washington (jwash) <[email protected]>
@brooksprumo brooksprumo mentioned this pull request Aug 23, 2021
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.

2 participants