-
Notifications
You must be signed in to change notification settings - Fork 44
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
Use set instead of radix tree, and move to non-global array_map #654
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Elazar Gershuni <[email protected]>
auto slot_svalue = stack.store(inv, data_kind_t::svalues, addr, width, val_svalue); | ||
auto slot_uvalue = stack.store(inv, data_kind_t::uvalues, addr, width, val_uvalue); | ||
inv.assign(slot_svalue, val_svalue); | ||
inv.assign(slot_uvalue, val_uvalue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is crucial. Without it, the svalue of the slot is removed during the second store. I don't know why it did not surface before.
As a general comment I'm worried about this change. The whole point of using a radix tree here is to be able to make joins very cheaply because the cost of a join is proportional only to the entries that change in both operands. Switching to a regular map might cause a big overhead. I'm surprised that you didn't see a big difference right now but it might happen in the future. |
I think the overhead has already been paid by the inefficient implementation of the radix tree - I think it has some issues in the iterator. Significant portion or the runtime is spent there. Also, remember that the stack is pretty small and the worst case you are worrying about is unlikely to happen. |
Signed-off-by: Elazar Gershuni <[email protected]>
Signed-off-by: Elazar Gershuni <[email protected]>
The radix-tree library is not maintained, and causes deprecation warnings.
This change comes with essentially no slowdown.