-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Replaces HashSet and HashMap with FxHashSet and FxHashMap #165
base: master
Are you sure you want to change the base?
Conversation
Should I migrate the steel/crates/steel-core/src/jit/ir.rs Line 1 in 40cd353
|
Should I migrate this commented out blocks?
steel/crates/steel-core/src/steel_vm/vm.rs Lines 5043 to 5048 in 40cd353
|
Anything that is commented out or not included you can skip |
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.
Thanks for the changes! I do think I should have been more clear on "blanket" replace things, since there are some spots we don't want that, however I left some comments on where we don't want the changes.
We should try to run some benchmarks on this as well before merge to make sure we're not introducing any regressions. Once we're ready we can do that
Sorry if I bulk swapped everything, I initially meant to look into every
single case, but I figured it would be way faster to swap everything and
wait for a review, since I’m not familiar at all with the codebase.
I’m applying the corrections as soon as I can
Il giorno sab 10 feb 2024 alle 17:41 Matthew Paras ***@***.***>
ha scritto:
… ***@***.**** commented on this pull request.
Thanks for the changes! I do think I should have been more clear on
"blanket" replace things, since there are some spots we don't want that,
however I left some comments on where we don't want the changes.
We should try to run some benchmarks on this as well before merge to make
sure we're not introducing any regressions. Once we're ready we can do that
------------------------------
In libs/steel-webserver/src/lib.rs
<#165 (comment)>:
> - query_parameters: HashMap<String, String>,
+ query_parameters: FxHashMap<String, String>,
Can we leave these the same?
------------------------------
In crates/steel-core/src/rvals.rs
<#165 (comment)>:
> SteelHashMap(value)
}
}
#[derive(Clone, PartialEq)]
-pub struct SteelHashSet(pub(crate) Gc<im_rc::HashSet<SteelVal>>);
+pub struct SteelHashSet(pub(crate) Gc<im_rc::HashSet<SteelVal, FxBuildHasher>>);
I realize this was unclear - however I would prefer if these do not take
the FxBuildHasher
------------------------------
In crates/steel-core/src/rvals.rs
<#165 (comment)>:
> SteelVector(value)
}
}
#[derive(Clone, PartialEq)]
-pub struct SteelHashMap(pub(crate) Gc<HashMap<SteelVal, SteelVal>>);
+pub struct SteelHashMap(pub(crate) Gc<ImmutableHashMap<SteelVal, SteelVal, FxBuildHasher>>);
Same here - if we could leave these as the default hasher since these are
how hash maps are implemented for values in steel
------------------------------
In crates/steel-core/src/steel_vm/primitives.rs
<#165 (comment)>:
> - table: HashMap<SteelVal, SteelVal>,
+ table: ImmutableHashMap<SteelVal, SteelVal, FxBuildHasher>,
I think this is an erroneous change - this shouldn't be changed to an
immutable hash map
—
Reply to this email directly, view it on GitHub
<#165 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOE5M75CXI7V224WH7KDBULYS6PLBAVCNFSM6AAAAABDB5NMH2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQNZTG4ZTQMJTGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This reverts commit 4b45147.
No worries! I should provide some more detail next time in the issue. Take your time, no rush |
Benchmarks
Unfortunately, I couldn't get rid of:
|
The other benches seems like they're disabled. Should I run them too? Otherwise, I'm rebasing against master and marking this PR as ready for review |
Closes #92
steel-gen
is missing)Should I also migrate files that are not currently included in the project? Like, the
jit
mod understeel-core
.