|
|
|
|
|
by geofft
3581 days ago
|
|
> 1. there's nothing useless about it Have you ever seen a "C"SV with a multibyte sequence as a delimiter? I haven't. Even if such a thing exists, the feature is of negative utility if it slows down CSV parsing for everyone else. If you must, write two implementations, and use the slow path if your delimiter is multibyte. |
|
Moving from runes to bytes in reading gives us a nice speedup - not quite to eliminate the gap, but it's a start. The rest is likely all the memory copies - once the data is read in a buffer, then copied byte by byte into a slice and only then converted into a string, which is another copy, because strings can't be based on pre-existing byte slices (not in the public API that is).