15
AoS and SoA - Wikipedia (en.wikipedia.org)
you are viewing a single comment's thread
view the rest of the comments
[-] dragontamer@lemmy.world 1 points 1 year ago* (last edited 1 year ago)

Its not so easy.

GPU-programmers are the expert in AoS vs SoA formats. And when you look at how RGB values are stored, its... incredibly complex. Sometimes you've got RRRRGGGGBBBB, sometimes its RGBARGBARGBA, sometimes its YYYYUUVV. What's best for performance changes dramatically on system-to-system, requiring lots of benchmarking and ultimately... a massive slew of processor-specific / ARM NEON instructions that convert between every format imaginable.

On right, GPUs don't need that processor-specific instruction because permute and bpermute instructions exist (32-way crossbar any data-to-any-lane movement, and vice versa any lane pulling from any data, permute and bpermute respectively). CPUs do need it though.

this post was submitted on 04 Jul 2023
15 points (94.1% liked)

Programming

17318 readers
84 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS