Why I find Rust interesting

March 24, 2023

Initially, I planned for this to be an introduction to the Rust programming language for colleagues at work. However, when looking around online for inspiration, I noticed that one thing there was no shortage of, were Rust introductions. So with that in mind, I thought I would instead focus why I personally find the language interesting. So I won’t be teaching you how to write Rust. I won’t be giving an overview of the language syntax, or its type system. ... Read more

Make your own quick, "simple" and portable heap allocation tracker in Rust

August 25, 2022

Besides altering your algorithms, another easy way to improve the performance of your code is by reducing heap allocations. Compared to the heap, stack allocations are significantly faster to both allocate and free, as they are usually done by simply updating a pointer, potentially in a single operation, and often by a dedicated CPU register. The heap on the other hand is a complicated beast. There is a fair amount of bookkeeping involved when acquiring and potentially releasing memory for your application, and avoiding this overhead will usually net you some decent performance gains, especially if these are happening frequently in your code. ... Read more

© 2023 | Follow on |