r/AskProgramming • u/SimplySomeDude • Aug 26 '26
How much does struct alignment really matter performance wise on modern GPUs?
Are things like std430 or std140 unnecessarily strict?
6
Upvotes
r/AskProgramming • u/SimplySomeDude • Aug 26 '26
Are things like std430 or std140 unnecessarily strict?
View all comments
Show parent comment
1
u/flatfinger Aug 27 '26
No layout is likely to be optimal for every possible access pattern. It's possible for layout X to be more than 50% faster than layout Y for some access patterns, while layout Y would be more than 50% faster than layout X for some other access patterns.