Rust language revs up compiler speed

Rust 1.13 is out, but it's marred by a 'serious' bug in ARM code generation

Rust language revs up compiler speed
cortixxx (CC0)

With the release of Rust 1.13, developers have improved compiler performance and security for the programming language. An issue remains, however, with code generation for ARM processors.

For better compiler performance, Rust 1.13 uses optimization to cache normalized projections during translation. With the generation of the LLVM IR (intermediate representation), the compiler no longer has to recompute concrete instances of associated types each time; instead, it reuses previously computed values.

“This optimization doesn’t affect all code bases, but in code bases that exhibit certain patterns, like futures-rs, where debug mode build-time improved by up to 40 percent, you’ll notice the difference,” the Rust Core Team said. Another optimization boosts compile time for crates (aka packages) exporting many inline functions.

Rust 1.13’s improved security arrives via the Cargo package manager, specifically through updates to the curl tool for transferring data and OpenSSL. But Rust still contains a “serious” bug in code generation for ARM targets using hardware floats—that is, most of them. “ARM targets in Rust are presently in our second support tier, so this bug was not determined to block the release,” the team said. “Because 1.13 contains a security update, users that must target ARM are encouraged to use the 1.14 betas, which will soon get a fix for ARM.”

To handle errors, the upgrade features a ? operator to reduce “visual noise.” The operator improves error-messaging. Rust 1.13 also features small changes to documentation. 

Sponsored by Mozilla, Rust is geared for concurrency, safety, and speed. Proponents have laid out a plan for 2017 in which the language will be easier to use while still focusing on speed and reliability. The upgrade is currently available for download.

Copyright © 2016 IDG Communications, Inc.