Repository navigation
Use numpy.empty() instead of bytearray to allocate host memory for spilling - #12399
Conversation
Codecov ReportBase: 86.58% // Head: 85.65% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## branch-23.02 #12399 +/- ##
================================================
- Coverage 86.58% 85.65% -0.93%
================================================
Files 155 155
Lines 24368 24812 +444
================================================
+ Hits 21098 21253 +155
- Misses 3270 3559 +289
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
vyasr
left a comment
There was a problem hiding this comment.
I suspect that there are places in our code that use e.g. numpy.zeros that could also be improved in this way, but that's out of scope for this PR.
jakirkham
left a comment
There was a problem hiding this comment.
Looks great! Thanks Mads 😄
Is there anywhere else we should be doing this?
|
Thanks @jakirkham and @vyasr, I think it can be merged |
|
/merge |
A
bytearrayis zero-initialized usingcalloc, which we don't need. Additionally,numpy.emptyboth skips the zero-initialization and uses hugepages when available numpy/numpy#14216.