hexml
hexml copied to clipboard
Avoid memory copying
Currently the first thing the Haskell layer does is append \0 to the string, forcing an entire copy and realloc. That's expensive - can it be avoided? If the last character is a known character, e.g. >, we could fake mark that the end of the string and only when looking for > would we have a special case. Do we have a buffer overrun attack that way?