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

Use set instead of radix tree, and move to non-global array_map #654

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

elazarg
Copy link
Collaborator

@elazarg elazarg commented Jun 27, 2024

The radix-tree library is not maintained, and causes deprecation warnings.

This change comes with essentially no slowdown.

Signed-off-by: Elazar Gershuni <[email protected]>
@coveralls
Copy link

Coverage Status

coverage: 90.505% (+0.07%) from 90.431%
when pulling c185ba7 on no-radix-tree
into cd399bb on main.

@elazarg elazarg requested a review from caballa June 27, 2024 12:04
Comment on lines +2073 to +2076
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);
Copy link
Collaborator Author

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.

@caballa
Copy link
Collaborator

caballa commented Jun 27, 2024

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.

@elazarg
Copy link
Collaborator Author

elazarg commented Jun 27, 2024

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.

@coveralls
Copy link

Coverage Status

coverage: 90.441% (+0.03%) from 90.409%
when pulling c26d9a9 on no-radix-tree
into 525b8b3 on main.

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

Successfully merging this pull request may close these issues.

3 participants