Closed schrimpf closed 11 months ago
The point of the PtrArray
is to potentially avoid allocations.
Julia does not have proper escape analysis, so it conservatively heap allocates unnecessarily. PtrArray
with GC.@preserve
is a workaround.
MArray <: StaticArray
and SArray <: StaticArray
.
MArray
is mutable, but SArray
is not. Other hypothetical StaticArray
s are mutable.
I don't really use this with StaticArray
s, though, and we can blame current limitations of Julia's compiler for the allocations, so I'm okay merging this.
Attention: 1 lines
in your changes are missing coverage. Please review.
Comparison is base (
c34cf44
) 74.10% compared to head (bfe3c8f
) 73.82%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This last change is about the best I can do. I do not understand the failed Aqua tests on version 1.6, and cannot fix them. They do not seem to matter anyway.
This last change is about the best I can do. I do not understand the failed Aqua tests on version 1.6, and cannot fix them. They do not seem to matter anyway.
I wouldn't worry about them either.
Fixes #27
A couple things of note:
SArray
s, since I think it's just not possible to modify them in placeStrideArraysCore
. It was only used to createPtr(x)
and I don't think it's needed.