5
top 1 comments
sorted by: hot top new old
[-] tunetardis@piefed.ca 2 points 6 days ago

I'm not a game dev but work in a scientific field. One thing I didn't see mentioned here which may or may not be relevant is it pays to try to keep your memory footprint as low as possible. Memory I/O is a bitch. So for example, let's say you have 2 vectors that interact in some way. You may be tempted to store precalculated interactions in a matrix, but generally speaking, it's best not to do this. Just calculate each cell of the matrix on the fly as you need it, even if it's a long formula and you need to access this same value many times. 2 vectors are more likely to fit in L1 cache and you'll get the best performance out of all the compiler optimizations. It makes a huge difference.

this post was submitted on 23 Oct 2026
5 points (77.8% liked)

C++

2385 readers
4 users here now

The center for all discussion and news regarding C++.

Rules

founded 3 years ago
MODERATORS