Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optmize newest_rooted_write #29

Open
grooviegermanikus opened this issue Aug 14, 2024 · 0 comments
Open

optmize newest_rooted_write #29

grooviegermanikus opened this issue Aug 14, 2024 · 0 comments

Comments

@grooviegermanikus
Copy link
Collaborator

let slots_map_min_slot = *self.slots.keys().min().unwrap_or(&0u64);

+        #[inline(always)]
+        fn get_slot(slot: u64, slots: &HashMap<u64, SlotData>, min_slot: u64) -> Option<&SlotData> {
+            if slot < min_slot {
+                return None;
+            }
+            slots.get(&slot)
+        }

See branch hacking/slotmap-min

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant