Chris Elrod
Chris Elrod
The above was with Clang, to make for an "apples to apples" comparison (although it's LLVM for Clang vs LoopVectorization.jl for Julia). GCC does better, at least for the predominantly...
We could use a library for better cross platform consistency, e.g. mimalloc: ```julia julia> using mimalloc_jll julia> function foo_mimalloc(p::Float64=0.95) if rand() < p L = 10 else L = 10000...
> I wonder if it would be advantageous here to make the SmallStore.outline just store a malloc'd pointer and then if it spills, register a finalizer that frees the pointer?...
This at least does not seem great: ```julia using mimalloc_jll @inline function smallarrayv2(::Type{T}, ::StaticInt{SpillSize}, size::Integer...) where {T, SpillSize} @assert isbitstype(T) N = prod(size) store = Ref{NTuple{SpillSize*sizeof(T),UInt8}}() ptr::Ptr{T} = if N
You need to inline at the Julia level. `@inline` always works when the callsite is inferred. Like you said, someone could use a callsite `@noinline`, and type inference could fail,...
It should probably only return another `StrideArray` if the original array was dense and column major.
You're welcome to make a PR! But for that particular use case, you could also use `ManualMemory.MemoryBuffer` directly. Another PR idea is to support that case directly, e.g. add support...
Thanks for the issue; fixed by https://github.com/JuliaSIMD/StrideArraysCore.jl/commit/9d3f77dbc1b89dd25ce7dfb2554088da9997ea6b for Julia 1.7 and newer.
Why not 1 & 2? I.e., let users decide what works best for their use case.
> `Base.unsafe_pointer_to_objref(ref)::TestMutableStruct` This or something like it seems like a good solution. ```julia julia> x = Ref(("hi", "world", 9)) Base.RefValue{Tuple{String, String, Int64}}(("hi", "world", 9)) julia> p = Base.unsafe_convert(Ptr{typeof(x[])}, x) Ptr{Tuple{String,...