Rust 1.23 Uses Less Memory |
Written by Kay Ewbank | |||
Thursday, 11 January 2018 | |||
There's a new version of Rust that uses less memory and no longer makes unnecessary copies. The documentation has also been changed to use CommonMark. Rust was originally sponsored by Mozilla, and is designed to be safe, fast and concurrent without having a garbage collector. It uses innovative means to make system programming safe by the language being constructed in such a way that problems can be detected at compile time. Intended uses include embedding in other languages, writing programs with specific space and time requirements, and writing low-level code, like device drivers and operating systems. The changes to this latest version start with the avoiding of making unnecessary copies of arguments that are simple bindings. The problem arose because in the past MIR (Rust's Mid-level Intermediate Representation of a program) differentiated between arguments and locals. This meant there was a need to add extra copies assigning the argument to a local, even for simple bindings. MIR has been changed so it no longer differentiates, but until now the copies have continued to be created, bloating the MIR and LLVM IR that the compiler emits. This has now been corrected. This has resulted in a five to ten per cent drop in memory usage in the tests run by the developers, though they say your mileage may vary. The other main change to this release is that rustdoc has been moved to use CommonMark. Until now, rustdoc never guaranteed which markdown rendering engine it used, but the developers have now committed to using CommonMark. The change isn't complete yet as the documentation in this release is being rendered with the previous renderer, Hoedown, as well as with a CommonMark compliant renderer. This release also sees the addition of some new stabilized APIs:
More InformationRelated ArticlesRust 1.20 Adds Associated Contents Updated Rust Improves Documentation Rust Hits Stable 1.0 - So What? Rust 0.4 Full Integration of Borrowed Pointers To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
Comments
or email your comment to: comments@i-programmer.info |