Skip to content
0:00 / 0:00

#jai#structureofarrays#data-orienteddesign

Data-Oriented Demo: SOA, composition

Jonathan Blow

99K subscribers • 11 videos on Hallway

YouTube
  • Recommended by 2 people: 1 on Hacker News and 1 on Lobsters.
  • Presented by Jonathan Blow, video game designer and programmer
  • An opinion. It argues one side of a question engineers disagree on.

Advanced. Deep dive for people who know the field.

200K views11 years ago2 recommendations

Systems programmingSoftware designData-oriented designPerformance and optimizationC++

Jonathan Blow demonstrates how to achieve object-system expressiveness with a data-oriented mindset, focusing on structure-of-arrays layouts and composition in Jai.

In this demo we start to do some 'object-system-ish' stuff, but with a data-oriented mindset. The goal is: how do we recreate some of the high-level expressiveness you get in a language like C++, but in a way that helps make your program fast?

Why it's here

2 people recommend this

What people say. Recommended for its practical walkthrough of structure packing, data-oriented design, and transparently switching between array-of-structures and structure-of-arrays layouts.

Moments people linked to

tomywson Hacker News • Recommends

On “The Lost Art of C Structure Packing”

He gives a fantastic walkthrough on his approach to structure packing in the data-oriented demo1. 1 link to this video

pushcxon Lobsters • Recommends

Data-Oriented Demo: SOA, composition

pushcxon Lobsters • Recommends

Data-Oriented Demo: SOA, composition

u/LaurieCheersin r/ProgrammingLanguages • Mentions

On “Do any languages have novel ways to represent data?”

Jai has some interesting ideas about making a struct of arrays interchangeable with an array of structs.

agentultraon Hacker News • Mentions

On “An introduction to NoFlo and flow-based programming”

I think you're referring to confirmation bias which is related but not quite the same. Never the less I understand what you're getting at. I took it to mean that the kinds of problems a programmer encounters is not sufficiently random to properly determine the usefulness of a given language or "paradigm." Which may keep people from switching to new, better tools (or from trying them out at all). The data-oriented design thing is interesting and something I've heard come and go over the years. Check out: link and link to this video A video demonstration of Jai; a new compiler from Jonathan Blow designed around this paradigm. Cheers!

taliesinbon Hacker News • Mentions

On “The death of optimizing compilers [pdf]”

> I'm not aware of any general-purpose language where this is an option to any significant degree (silent AOS-to-SOA, hot-vs-cold data segregation, tree clustering, etc...) Not yet, of course, because it hasn't been released, but Jonathan Blow's Jai language offers transparent switching between AOS and SOA, as well as many other features that make it easy to explore the 'optimization space' of a program manually. link to this video (for those who don't know, Jonathan Blow was the creator of Braid)

clucason Hacker News • Mentions

On “Handles Are the Better Pointers (2018)”

Here is the demo video of the stuff zero_iq is talking about: link to this video Basically right on point with what the GP is saying.

u/BigOnLognin r/compsci • Mentions

On “DCIC: A new book for teaching beginners programming and computer science”

I haven't looked at the book, but I love this concept. Casey Muratori freed my mind on the subject. OOP is terrible. So many of the smartest people in the field have come to this conclusion on their own over the years: Mike Acton at CPP Con 2014 Stoyan Nikolov at CPP Con 2018 Mike Acton and Casey Muratori Discussing justifications for DOD Jonathan Blow (he gives yet more resources on the subject in his talk).
2View on Reddit

u/johnfrazer783in r/ProgrammingLanguages • Mentions

On “What do you think of my reasons for disliking rust?”

As for point #3 I found the link provided in another comment very insightful, quote: "Properties are a fix to the verbosity that exists within languages that mix data and function (the old way of doing OO)." There's also a talk by Jonathan Blow: *Data-Oriented Demo: SOA, composition* that seems worth watching. I have used properties in Python and proxies in JavaScript, and I'm not entirely sure when the 'causes hidden gears to do magic' part of them is really an anti-pattern because it's basically pretending you're just updating one attribute when in reality anything could've happened (in the general case). Is it possible in Rust to inhibit setting attributes where appropriate and issue…