It's wonderfully easy to switch out the allocator in Rust: https://doc.rust-lang.org/edition-guide/rust-next/no-jemalloc.html
Sadly it didn't help difftastic performance despite doing a lot of allocation, but it's really easy to try it!
miniblog.
Related Posts
Most of the code I write is in a garbage collected language.
I'm often surprised how much extra performance I can get when I can control allocations. I saved ~10% runtime in difftastic by moving to a zero-allocation colour library (owo_colours)!
Finally got dynamic string allocation working in my toy compiler! https://github.com/Wilfred/proper-compiler-hat/commit/cd726f45eb0540eb54c2c3c7e0ab75a651c46a43
Implementing intrinsics made this way easier: writing a single large assembly function is a pain.
An interesting commit in GNU Emacs: optimising the format command by allowing (format "%s" x) to just return x, saving a string allocation. This was already the place in some parts of elisp, but it's now documented and taken advantage of :)
https://github.com/emacs-mirror/emacs/commit/3db388b0bf83d3138562f09ce25fab8ba89bcc81