Re:The Lost Art of C Structure Packing
by evincarofautumn on Wednesday January 01, 2014 @03:27PM
(#6996441)
Working with unzipped structures (xs+ys instead of xys) can be a bit of a pain. It seems like a transformation that a compiler should be able to do easily, given enough information about structure and (ugh) aliasing. I wish C had real array types. :(
[ Parent
| on HN ]
Re:The Lost Art of C Structure Packing
by carterschonwald on Wednesday January 01, 2014 @05:14PM
(#6996992)
Happily, in Haskell the standard array library does the struct of arrays format for unboxed arrays. It's super handy!
Re:The Lost Art of C Structure Packing
by evincarofautumn on Wednesday January 01, 2014 @09:20PM
(#6997827)
I thought the array package was deprecated. Its mutable API is nicer than vector’s, though, if I recall correctly.
Vector does the SOA represetation too.
Re:The Lost Art of C Structure Packing
by carterschonwald on Friday January 03, 2014 @12:43PM
(#7006770)
yup, Vector is the one i have mind. (Vector is also an array lib)