Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
:'( Put back a generated func for unsafe_load large structs (#38)
* :'( Put back a generated func for unsafe_load large structs I can't find any other variant that produces non-allocating, fast code for structs with > 32 fields. Since `blob[]` is a pretty important feature of the blobs package, I think we cannot do without this change. I don't know how often we have such big structs, but if we do, we will need this. Too bad though! Some alternatives I tried, but none of them worked: ```julia @_make_new(T, ntuple(I->unsafe_load(getindex(blob, fieldname(T,I))), fieldcount(T))) @_make_new(T, Tuple(unsafe_load(getindex(blob, i)) for i in 1:fieldcount(T))) @_make_new(T, Tuple(map(i->unsafe_load(getindex(blob, i)), 1:fieldcount(T)))) TT = Tuple{fieldtypes(T)...} @_make_new(T, ((unsafe_load(getindex(blob, i)) for i in 1:fieldcount(T))...,)) ``` * Put back fieldnames, due to ambiguity with getindex() on vectors
- Loading branch information