It’s a great candidate for a rewrite buy why not Go, Zig, Ocaml, Haskell e. t. c.?
My not-completely-naive guess is an expert optimizer can get the improvement they're looking for with only small parts or maybe even none of it rewritten in another language.