While working on a complex physics system, Durable Programming, LLC sped the simulation up from 50ms to 3-4ms - that's almost ten times faster.
PEMBROKE, N.H., May 16, 2026 /PRNewswire-PRWeb/ -- Durable Programming has reduced physics simulation tick time from approximately 50ms to 3-4ms in a complex mRuby application project by rewriting critical-path code in Rust. The remaining application logic stays in mRuby, preserving the developer experience advantages that make Ruby an effective scripting language for complex systems.
Simulation-heavy applications frequently face a difficult choice: use a high-level scripting language and accept performance limits, or rewrite in a systems language and accept the added complexity across the entire codebase.
"The physics tick was our bottleneck," said David Berube, President of Durable Programming. "Rust gets us down to 3-4ms per tick on code that was taking 50ms in mRuby. Everything else stays in mRuby, so we keep the productivity advantages."
mRuby is an embeddable, lightweight implementation of the Ruby language designed for resource-constrained environments, game engines, and applications that need scripting without the overhead of a full Ruby runtime. Rust is a systems programming language that compiles to native code and offers performance comparable to C and C++. The two languages interoperate through Rust's foreign function interface (FFI), allowing mRuby scripts to call Rust functions as if they were native methods.
The performance improvement comes from a few specific properties of Rust: it eliminates garbage collection pauses, compiles down to optimized native instructions, and gives the programmer direct control over memory layout — all of which matter when a physics simulation needs to run rapidly. In some cases, this can mean running hundreds or thousands of times per second.
Organizations building simulation software, game engines, or other performance-sensitive systems in mRuby can apply the same approach: profile to find the actual bottleneck, rewrite that specific component in Rust, and call it from mRuby through the FFI.
Teams exploring mRuby and Rust performance optimization, Ruby-Rust FFI performance tuning, or embedded scripting language performance improvement can schedule a consultation at durableprogramming.com or contact [email protected].
**About Durable Programming**
Durable Programming specializes in maintaining and modernizing enterprise applications. The company helps organizations reduce technical debt, improve system reliability, and enable sustainable long-term maintenance of business-critical software. Durable Programming serves clients across industries with a focus on Ruby on Rails and legacy system modernization, and is based in Pembroke, New Hampshire.
**Contact:**
David Berube
Durable Programming
durableprogramming.com
Media Contact
David Berube, Durable Programming, 1 (603) 489-6135, [email protected], https://durableprogramming.com/
SOURCE Durable Programming
Share this article