Linked Questions
17 questions linked to/from What is data oriented design?
26 votes
2 answers
11k views
Data-oriented design in practice?
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 of ...
1 vote
6 answers
5k views
Which is faster for large "for" loop: function call or inline coding?
I have programmed an embedded software (using C of course) and now I'm considering ways to improve the running time of the system. The most important single module in my system is one very large ...
5 votes
2 answers
3k views
Array of Structures (AoS) vs Structure of Arrays (SoA) on random reads for vectorization
My question is in regard of the following phrase from the book: Unfortunately, the SoA form is not ideal in all circumstances. For random or incoherent circumstances, gathers are used to access ...
3 votes
1 answer
3k views
What's the difference between Data Oriented and Data Driven Programs?
I know a bit about data oriented design, like rather than having a class for a single object, you have a class which contains multiple objects, like instead of: struct Circle { int x, y; int radius; }...
5 votes
1 answer
2k views
Write efficient entity system like in C++
I'm trying to make an efficient "entity system" in C++, I've read a lot of blog/articles/documentation on the Internet to get lot of information but I've got some questions again. I've find two ...
1 vote
2 answers
1k views
Let a Class store unknown Data
Issue about Storeing unknown Data in a Class How can I provide a class in C++ which is able to store any number of variables each of any type? From inside and outside of the class I would like to ...
2 votes
4 answers
318 views
getters and setters in class
I am trying to write a program considering that I have a huge array of objects( conatinng some data such as id, name etc) I have a display menu something like : 1) display_menu() { vector< ...
1 vote
3 answers
1k views
Improving data locality of reference when storing pointers to objects
How I understand things is that storing objects directly to a vector yields better performance than storing pointers to them because of prefetching. std::vector<Object> container1; // The ...
2 votes
2 answers
403 views
How to link elements from different vectors with each other?
I want to write a program which reads names in a vector. After that it should read ages into another vector. (that's done) The first element of the name-vector should be connected to the first ...
4 votes
1 answer
389 views
Why numpy vectorization is slower than a for loop
The below code has two functions that does the same thing: checks to see if the line between two points intersects with a circle. from line_profiler import LineProfiler from math import sqrt import ...
-1 votes
3 answers
217 views
Is it possible to create a vector on the stack?
Due to optimization reasons I want my vector to exist in the cache, and having it on the stack greatly increases the odds of that. Is it possible to create a vector on the stack? I'm completely ...
4 votes
1 answer
277 views
Iterating over an array of class objects VS a class object containing arrays
I want to create a program for multi-agent simulation and I am thinking about whether I should use NumPy or numba to accelerate the calculation. Basically, I would need a class to store the state of ...
1 vote
1 answer
396 views
In Unity, how do you create a collection of pointers?
Is it possible to create a list or array of pointers in C#? I want to have a list of T* rather than use IntPtr because i am forever having to type Marshal Ptr To Structure methods all over the place ...
0 votes
1 answer
499 views
Reference another class using an index vs storing entire instance
In a class which needs to "contain information" about another class (sorry I don't know the terms for this), should I store the reference to that other class as something like an integer/id, or should ...
1 vote
1 answer
283 views
Java 8 : Optimal Way to Compute Min and Max in Large List
I have the below code in which am computing Min and Max ordered items from list of Orders and works as expected. Am wondering if this can be refactored/improved any further to make it more optimal and ...