Skip to main content
0 votes
0 answers
39 views

Cache-optimized way to process collisions between all pairs of objects in two arrays

I am working on the hitbox collision system for a game. I have two arrays of convex objects that I need to check for collisions between objects in opposite lists (M hitboxes vs N hurtboxes). I am ...
Sir Nate's user avatar
  • 317
0 votes
1 answer
28 views

Dependency injection in data oriented programming

In the book "Data-Oriented Programming" by Yehonathan Sharvit there's an example of how to store data to a database in Chapter 10.2: class CatalogDB { static addMember(member) { var ...
Littlee's user avatar
  • 4,227
0 votes
0 answers
120 views

"AppendRemovedComponentRecordError" when instantiating an Entity in Unity DOTS

I'm trying to use Unity DOTS for a game project, however I keep hitting the following error mentionned above when trying to instantiate Entities referenced in a BlobArray: ArgumentException: System....
Chachoune963's user avatar
1 vote
0 answers
221 views

How can the C++ data-oriented design achieve polymorphism without using virtual functions?

I have found that data-oriented programming is a good way to bridge the gap between object-oriented programming and functional programming. Data-oriented design uses data instead of objects: https://...
Nathan Doromal's user avatar
0 votes
1 answer
48 views

Sealed Clojure protocols

I'd like to know if Clojure utilizes the sealed interface/ implementing record pattern in Java, and if so how to define it. I was thinking along the lines of something like: (defprotocol ;; ...
Shmuel Greenberger's user avatar
1 vote
1 answer
919 views

Does "Data Oriented Programming" just mean "using a global object" in javascript terms?

Ola, I am trying to understand how DOP would work through a JavaScript dominated lens. DOP seems to only offer a handful of examples, most of which are written in OOP based languages. My lack of ...
Nightfall's user avatar
  • 127
6 votes
1 answer
492 views

Why is summing over members of this struct of arrays much faster than summing over an array of structs?

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 to ...
Benjamin Bihler's user avatar
2 votes
1 answer
175 views

Building a Production-grade Data Science environment at home - Questions around orchestration

I hope you can help me here. I am working on creating a small environment at home for Data Science. I am having trouble understanding how to create the orchestration layer properly (I am also not ...
JusefPol's user avatar
0 votes
0 answers
40 views

C++ trick to calling an overloaded function by it's number of parameters based on a class template

I have to build an interface HistoWapper that aggregates a histogram class that has three methods which vary by their parameter count, which I have to call class Histogram { ... double Interpolate(...
Orwellian Mentat's user avatar
0 votes
1 answer
261 views

C++ static allocation of associative map

I'm writing a shared library in C++ and have the (mostly educational) goal to have every bit of heap allocation done by the library to live in a single, contiguous block, allocated at initialization ...
Gabriel Golfetti's user avatar
0 votes
2 answers
97 views

Is it OK to to add negligible risks of errors for performance gains? (fixed hash map bucket size)

I have recently been making a custom hash map for a project in C. My hash map currently works like this: the key is hashed via the Fowler–Noll–Vo 1a hash function to minimize collisions if the ...
xr4's user avatar
  • 3
1 vote
1 answer
204 views

Cannot Pass A Section Of An std::array As A Template Reference Type Argument

I would like to keep arrays of similar data contiguous for processing. For simplification let's say that I would like to keep an array of ints separate from an array of chars so that when I want to ...
Ryoku's user avatar
  • 417
2 votes
2 answers
537 views

Big projects that require very good performance really don't use polymorphism?

For quite some time I have been interested in perfomance in C ++. A lot of things keep coming up, whether in conferences or in books: Do not use a virtual function, have the data in the cache, the ...
antho's user avatar
  • 628
1 vote
0 answers
412 views

Data Oriented Design and Cache Locality

In Richard Fabian's Data Oriented Design, he gives an example of component based objects for a game where the different properties that an object can have are separated into distinct arrays, and ...
bob's user avatar
  • 115
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; }...
1mcrazy's user avatar
  • 33

15 30 50 per page
1
2 3 4 5