Open eranchetz opened 6 years ago
appreciate the PR! just btw, you're only filling the first N chars of the slice plus the appended linefeed, so you've got a bunch of 0 bytes in the middle:
The alternative is to append the EOL after the N Chars like so
[121 10 0 0 0 0 0 0 0 0 0 0 .... 0]
Does that make more sense?
Is this your implementation https://www.reddit.com/r/programming/comments/6gxf02/how_is_gnus_yes_so_fast_xpost_runix/dity5pj/ ? I can use that instead
@ericlagergren ok, I got your point, let me fix that does this make more sense? https://play.golang.org/p/JUpuypcAne
@ericlagergren I fixed it, and fixed some lint issues
Using a fixed size byte array increases performance by x100