Hacker News new | ask | show | jobs
by amindiro 990 days ago
Hello,

Just reimplemented the infamous video "Clean" Code, Horrible Performance" in Rust!

Casey Muratori showed how trying to be cute with your code and introducing unnecessary indirection can hurt performance. The enum version is 1.6x faster than using traits + dynamic dispatch. The data oriented version is 2.27x faster than dynamic one.

Hope you'll enjoy this short article and I'd be happy to get comments on the implementation and the subject in general!