News for hackers. Stuff that matters.
Re:Joint Allocations in C++ by uxcn on Monday September 14, 2015 @05:01PM (#10217440)
I suspect the compiler will be better able to optimize offsets than pointers just because of the semantics required by the language, but I think you're right that it isn't necessarily one size fits all. Another possible solution might even be storing static bounds at specific intervals. Without numbers, I can only guess which would give optimal performance though.

I think the library approach is right. It would be nice to see the language transparently support contiguous array members, but supporting it in a library will allow more people to use it regardless of compiler. It avoids the standards approval process and implementation as well, which take non-trivial amounts of time. The 0x/1y features definitely make it a lot more feasible.

It would probably give people a better chance to play with the source if you could post a link to it somewhere. I'm not sure what you plan to license it under.

I'll keep an eye out for the next post.

There are no comments on this comment yet.