-
Notifications
You must be signed in to change notification settings - Fork 282
Recursion guard #134
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
Recursion guard #134
Conversation
Codecov Report
@@ Coverage Diff @@
## main #134 +/- ##
==========================================
+ Coverage 97.31% 97.44% +0.12%
==========================================
Files 40 41 +1
Lines 3916 4068 +152
Branches 28 28
==========================================
+ Hits 3811 3964 +153
+ Misses 105 104 -1
Continue to review full report at Codecov.
|
If I understand correctly, you basically have a And yes agreed that ideally you'd make it an Have you considered using https://github.com/paritytech/nohash-hasher since you're using python's id as the key? |
Interesting, I'll see if it's faster than ahash, I guess it must be. |
You were right samuelcolvin/rust-bench@95b1062
|
nice! 2x as fast, and 5x faster than the standard alg |
264ce7f
to
cc8f137
Compare
I'm going to merge this, it might not be perfect but we can improve if someone can find a case which breaks it. |
This is a first, very naive attempt.
It seem to simple - am I missing something?
@adriangb please let me know what you think.
Needs:
recursion_guard
a struct withNone
by default until it's usedobj.as_ptr() as usize
is a legitimate way to doid(obj)