JuliaArrays / JuliaArrays/UnsafeArrays.jl
Feature request: mutable unsafe vectors
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 46
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
An unsafe vector could also provide push!, pop!, etc which grow/shrink the view, respectively, overwriting entries of the parent.
This would be used via uview = push!(uview, val). These can be significantly faster than base vector push!/pop!, since we can avoid both the ccall and the stupid second read-increment-store due to the fact that vectors store both length and number of rows (why, oh why).
One would need to also store a pointer_from_objref to the underlying vector, in order to not exceed its length, and resize it if necessary. See https://github.com/JuliaLang/julia/issues/24909.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the unsafe-vector view implementation and Julia issue #24909; confirm how the parent vector’s length and backing storage are tracked. Done means push! and pop! can grow or shrink the view while overwriting the parent safely and respecting its available storage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100