-
Notifications
You must be signed in to change notification settings - Fork 162
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
Refactor src/hpc/traverse.c #2102
Conversation
3a78b9a
to
2b5bc24
Compare
Codecov Report
@@ Coverage Diff @@
## master #2102 +/- ##
===========================================
+ Coverage 53.9% 69.24% +15.34%
===========================================
Files 426 489 +63
Lines 224155 256303 +32148
===========================================
+ Hits 120821 177485 +56664
+ Misses 103334 78818 -24516
|
8928f32
to
5fbc375
Compare
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.
Except for a minor comment on an "empty" TODO this looks good to me.
I assume we'll add proper tests in your later PR? (Or later full stop)?
src/hpc/traverse.h
Outdated
|
||
// | ||
// TODO | ||
// |
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.
What is it that needs to be done?
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.
Ah, I wanted to add a comment there explaining what the function does. I'll remove this here, and add that comment in a future PR (I already have a bunch of them which I wrote while trying to understand the traverse code, and fixing some of it)
E.g. the code for traversing and copying weak pointer objects now is in weakptr.c, and traverse.c knows nothing about weak pointer objects.
1cd7ea8
to
9156d95
Compare
I took care of the And yeah, further improvements are planned for a future PR. |
One motivation was to remove the need for putting knowledge about how weak pointer objects work in there, which poses a (minor) complication for PR #2092
It also correct some quirks in the traverse code (e.g. the traversal for immutable lists of cyclotomics and FFEs was not being set before, leading to suboptimal performance), and opens it up for use by kernel extensions.
This code might at some point become interesting for GAP, too. In particular, I'd be curious to test performance for copying objects with it vs. with our current copying code. Of course I expect the current copying code to be faster, but by how much? If it is not too much, I'd investigate switching GAP to this alternate copying code, simply because it is much simpler (and would allow us to get rid of the
COPYING
tnum trick).