data-oriented-design Questions

6

Solved

I was reading this article, and this guy goes on talking about how everyone can greatly benefit from mixing in data oriented design with OOP. He doesn't show any code samples, however. I goo...
Spense asked 29/10, 2009 at 4:13

1

Solved

I have been using https://github.com/google/benchmark and g++ 9.4.0 to check the performance of data access in different scenarios (compilation with "-O3"). The result has been surprising...

2

Because of Unity ECS, I've been reading a lot about ECS lately. There are many obvious advantages to an ECS architecture: ECS is data-oriented: Data tends to be stored linearly, which is the most...

1

Solved

The saying goes something like this: "Program to an interface/abstraction, not to an implementation". We all know interfaces as a means of decoupling in object oriented programming. Like a contr...
Prier asked 30/12, 2018 at 11:20

2

Solved

Say I have a large code using Array of Structures (AoS) memory layout. I would like to build a zero-cost abstraction in C++ which allows me to switch between AoS and SoA with as little refactoring ...

8

So, there's this rule to try to pull if statements out of high repetition loops: for( int i = 0 ; i < 10000 ; i++ ) { if( someModeSettingOn ) doThis( data[i] ) ; else doThat( data[i] ) ; } ...
Hodson asked 19/6, 2012 at 14:35

2

In a regular object oriented practice it is not that rare objects have multiple unrelated member properties. And when objects are being processed, it is not rare that it is done in different passes...

2

Solved

I am trying to understand data-oriented design on a simple, specific problem. Apologies in advance to data-oriented design people, if I am doing something very stupid, but I am having a hard time u...
Netsuke asked 1/11, 2017 at 10:6

6

Solved

The goal is to change the behaviour in an event loop, depending on whether a checkbox is toggled on or off. The simplest way, that I can think of, is just to test the checkbox state each time the l...

4

I am working on an entity component system for a game engine. One of my goals is to use a data oriented approach for optimal data processing. In other words, I want to follow the guideline of rathe...
Freehold asked 13/3, 2013 at 12:11

4

Solved

I am trying to get a good grip on data oriented design and how to program best with the cache in mind. There's basically two scenarios that I cannot quite decide which is better and why - is it bet...
Disjoined asked 1/10, 2013 at 21:25

7

Solved

using namespace std; Consider a traditional OOP approach to entity/object management: struct Entity { bool alive{true}; } struct Manager { vector<unique_ptr<Entity>> entities; // ...
Geronimo asked 15/10, 2013 at 16:2

1

Solved

I've recently been reading about AoS vs SoA structure design and data-oriented design. It's oddly difficult to find information about either, and what I have found seems to assume greater understan...
Barris asked 20/10, 2016 at 20:14

1

Solved

Background In game engine development we usually use a data oriented design for optimal memory and computation performance. Let's take particle system as an example. In a particle system, we hav...
Trueman asked 28/9, 2016 at 18:16

3

I need to create small-mid sized static hash tables from it. Typically, those will have 5-100 entries. When the hash table is created, all keys hashes are known up-front (i.e. the keys are already ...
Thrippence asked 10/6, 2011 at 20:43

3

I am writing a physics engine and having a hard time figuring out a good way to design my data storage. The functionality that I want: Have a class that represents a PhysicsBody Have a class th...

2

Anyone thought about how to write a memory manager (in C++) that is completely branch free? I've written a pool, a stack, a queue, and a linked list (allocating from the pool), but I am wondering h...
Tolerant asked 22/3, 2010 at 10:21

1

Solved

One feature that plays a prominent role in many of the writings on data oriented design is that there are many cases where rather than AoS (array of structs): struct C_AoS { int foo; double bar;...
Grubman asked 19/3, 2015 at 0:30

3

Solved

I have a tree structure like this: a Model has a root Node and each Node has any number of child Nodes and also any number of Meshes. A lot of the time in my application is spent traversing this t...
Exhibitive asked 16/2, 2015 at 15:37

1

Solved

I'm testing how reading multiple streams of data affects a CPUs caching performance. I'm using the following code to benchmark this. The benchmark reads integers stored sequentially in memory and w...
Jerky asked 23/1, 2015 at 10:9

2

Solved

Coming from a background of C/C++, memory layout of objects with regards to reducing cache misses is something that is crucial especially when working on consoles. Data-oriented design is oft...
Extrorse asked 30/7, 2014 at 15:46

2

Solved

In this slides (after slide 15) it is suggested to use void updateAims(float* aimDir, const AimingData* aim, vec3 target, uint count) { for(uint i = 0; i < count; i++) { aimDir[i] = dot3(a...
Pitcher asked 27/8, 2012 at 12:3

2

Solved

There has been one more question on what data-oriented design is, and there's one article which is often referred to (and I've read it like 5 or 6 times already). I understand the general concept o...
Postpositive asked 6/8, 2010 at 16:44

3

Solved

Please consider the branch prediction too before answering this question. I have some scenarios where i can replace a conditional statement with a call to a function with the help of function poin...

2

Solved

Currently I want to optimize my 3d engine for consoles a bit. More precisely I want to be more cache friendly and align my structures more data oriented, but also want to keep my nice user interfac...
Fifteen asked 6/10, 2010 at 12:23

© 2022 - 2024 — McMap. All rights reserved.