Topics /

Software Engineering

The most popular blog posts about software engineering on Hacker News. 1,357 posts.

2019
1024

Formatting Is Unreasonably Expensive for Embedded Rust

As a (late) part of the #rust2020 request, I wanted to talk about one of the paper-cuts that has become decently problematic for new and experienced users of Embedded Rust: The size costs of formatting in Rust today are unreasonably expensive for users of Rust on bare metal embedded systems. In particular there are…

1050

A Fairly Fast Fibonacci Function

A common example of recursion is the function to calculate the $n$-th Fibonacci number: def naive_fib(n): if n < 2: return n else: return naive_fib(n-1) + naive_fib(n-2) This follows the mathematical definition very closely but it’s performance is terrible: roughly $\mathcal{O}(2^n)$. This is commonly patched up with…