Found while profiling #38927 When the query is not a regex, the same replacement can be applied to all matches. Previously, `replacement_for` allocated a new String on every call, while `replacement` returns a reference. Release Notes: - N/A --------- Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>