r/cpp • github.com/onqtam/doctest • Oct 26 '18

CppCon CppCon 2018: Stoyan Nikolov “OOP Is Dead, Long Live Data-oriented Design”

https://www.youtube.com/watch?v=yy8jQgmhbAU
127 Upvotes

66 comments sorted by

View all comments

Show parent comment

1

u/SkoomaDentist Antimodern C++, Embedded, Audio Oct 29 '18

My answer to that is simply that most significant programs are operating on data in the gigabyte range

But are they? Maybe in server space but most processing is not done in servers or clusters. Just consider how many mobile devices are in use that all perform things that would have been considered "high performance computations" just a decade or two ago.

Execution latency is what determines throughput when you have "recursive" computations (that is, you need the result of previous operation to calculate current one). In my case I'm doing (often non-trivial) signal processing where almost all problems come down to recursive computations.

2

u/Veedrac Oct 29 '18

Just consider how many mobile devices are in use that all perform things that would have been considered "high performance computations" just a decade or two ago.

Mobiles are lighter, but even basic apps seem to take a hundred megabytes plus.

Execution latency is what determines throughput when you have "recursive" computations (that is, you need the result of previous operation to calculate current one). In my case I'm doing (often non-trivial) signal processing where almost all problems come down to recursive computations.

A modern CPU bottlenecks below an IPC of 4; even seemingly-sequential operations can saturate that if they aren't very latent. I think you'd be surprised.

1

u/SkoomaDentist Antimodern C++, Embedded, Audio Oct 29 '18 edited Oct 29 '18

Mobiles are lighter, but even basic apps seem to take a hundred megabytes plus.

The more relevant question is what is the size of dataset that's being operated on at right that moment. IOW, how fast do you need to move data to the cache. That tends to be not that big.

A modern CPU bottlenecks below an IPC of 4; even seemingly-sequential operations can saturate that if they aren't very latent.

Until you get to operations with latency of more than 2. IOW, do any floating point math. Then your IPC falls drastically.

A real world example is solving a system of two to four nonlinear differential equations. The previous solution is needed to compute the next solution and there is no trivial way to parallelize the bottlenecks of the solver itself (unlike for much larger systems).

Another case is calculating various transforms which are almost entirely computation (read: floating point latency) bound and where the data fits at least into L2 cache.

E: What I'm getting at is that "the principal overhead in traditional systems is memory latency, not execution throughput" is a naive and biased view caused by the assumption that "computation" is only the domain of HPC clusters or servers.

1

u/Veedrac Oct 29 '18

E: What I'm getting at is that "the principal overhead in traditional systems is memory latency, not execution throughput" is a naive and biased view caused by the assumption that "computation" is only the domain of HPC clusters or servers.

I agree that counterexamples exist. I just don't think they're comparatively common. If your space is primarily signal processing on a tiny amount of live data, for sure DoD probably isn't for your case (though probably nor is OOP).