I know nothing about Elixir but I found this curious &quot;You can also see an extra tiny optimization performed by the regex engine — notice that the final string uses the ampersand from the original string, rather than from the replacement string&quot;.
OK, but why does it need 4 pointers instead of 3 with the beginning slice length incremented (7 bytes)?