Get the latest tech news

Revisiting Loop Recognition in C++ in Rust


Cargo Cult Programming

It does so without a traditional garbage collector; instead, memory safety errors and data races are prevented by the "borrow checker", which tracks the object lifetime of references at compile time. For example, the choice was made to turn the entire algorithm into a class that holds the CFG and LSG as member variables when the Havlak paper passes them as arguments to a free function (which the C++ code still does for the entrypoint). We found that the original C++ forgot to calculate nesting levels required for printing, giving it a slight performance boost compared to implementations that remembered to do the work.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Rust

Rust

Photo of C++

C++

Photo of loop recognition

loop recognition

Related news:

News photo

Writing your own C++ standard library part 2

News photo

C++ to Rust Phrasebook

News photo

Using Rust Back End to Serve an SPA