Elektrine lite

← Feed

@zeux@mastodon.gamedev.place

Post #1983665

2023-07-01 00:07 UTC

New blog post, "Efficient jagged arrays"! Here we go over a few steps that progressively optimize a fairly useful general "array of arrays" data structure to get to something that's low-overhead yet still simple. As usual, 🚀 appreciated! https://zeux.io/2023/06/30/efficient-jagged-arrays/

Replies (6)

  • @zeux@mastodon.gamedev.place it’d be nice if the post contained pictures of what the jagged arrays look like in memory at each step. It’d help with understanding and also make the post more skimmable. The post also doesn’t *clearly* state what the neat ideas are. I jumped to the conclusion and it doesn’t say either! I’m lazy and as written the whole post has to be read carefully and slowly to build the mental model.

    Open ##2494200

  • @aras@mastodon.gamedev.place 2023-07-01 07:15

    @zeux@mastodon.gamedev.place nice! btw in just-released Blender 3.6 where they have “a lot of mesh related operations are faster”, a bunch are due to a very similar application to mesh related data structures - one allocation instead of separate ones, computing counts from final offsets table etc.

    Open ##2494203

  • @zeux@mastodon.gamedev.place great post - I love it when you do these deep dives man!

    Open ##2494204

  • @zeux@mastodon.gamedev.place Nice post - thanks a lot! Its one of my most used 'complex' data structures on the gpu - very useful for problems that require a dynamic number of elements (culling/triangle merging/meshing) and with an efficient prefix sum it maps pretty well to the gpu.

    Open ##2494205

  • @zeux@mastodon.gamedev.place Added to my reading list! For a BSP builder in a hobby project I once wrote typedef std::string Polygon; to represent polygons as vertex index lists. I did it for the small string optimization and it worked fine. But the contents did look pretty weird in a debugger 😅

    Open ##2494207

  • @Reg@mastodon.gamedev.place 2023-07-09 21:05

    @zeux@mastodon.gamedev.place A great article! I only think that adding some diagrams would be helpful in understanding these concepts.

    Open ##2494209