hexml icon indicating copy to clipboard operation
hexml copied to clipboard

Avoid memory copying

Open ndmitchell opened this issue 9 years ago • 0 comments

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?

ndmitchell avatar Dec 04 '16 19:12 ndmitchell