Skip to content

Commit e4b43e3

Browse files
authored
perf: use size with offset in lazy loading BTreeMap items (#337)
This PR improves performance by removing duplicated reads of lazy object size. Lazy objects had duplicated reads for the size of the stored data. First when it lazily stores the object by reference (it needs to know the size of the data to advance the offset). And then the second time when the object needs to be downloaded. Now the size of the data is stored next to the offset on the first read and skipped reading on the second one. Google sheets [CSV reports](https://docs.google.com/spreadsheets/d/1uHaC0RJ_v9XG8fsP_k236zlda5eFaufpUKAwqxJsd5M/edit?usp=sharing). btreemap regressed: 11, instructions Δ%: max +3.81% 🔴 btreemap improved: 70, instructions Δ%: min -5.42%, median -1.15% 🟢
1 parent be28605 commit e4b43e3

File tree

6 files changed

+635
-617
lines changed

6 files changed

+635
-617
lines changed

0 commit comments

Comments
 (0)