Comment

Comment by amindiro

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!

parent amindiro 3 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton