logoalt Hacker News

flohofwoetoday at 9:14 AM3 repliesview on HN

Are there any programming languages which change the data layout beyond naively sorting struct members by alignment? (which at best helps with reducing padding bytes but can be either good or bad for performance, depending on the code which accesses the data).


Replies

fulafeltoday at 12:37 PM

Halide comes to mind (though it a DSL and not a full independent language).

I wonder if Futhark does? Eg https://futhark-lang.org/student-projects/pedersen-nelin-msc...

londons_exploretoday at 10:47 AM

One simple optimization is to change arrays of struts into struts of arrays. To my knowledge, nothing even makes those changes, despite them being safe and having a huge potential performance benefit.

show 1 reply
pillmillipedestoday at 11:35 AM

various SQLs and APLs come to mind :) the industry still has a lot to learn from them both