News for hackers. Stuff that matters.
Re:How quickly can you break a long string into lines? by tomByrer on Sunday April 28, 2024 @03:58PM (#40191336)
I'm grateful that both x86 & ARM CPUs are perf-tested.
Re:How quickly can you break a long string into lines? by pestatije on Sunday April 28, 2024 @03:57PM (#40191329)
> half the speed as that of a memory copy

without going into much deep analysis, id try writing the newlines in a different loop: you are hitting the cache(and memory) in a different way when memcopying and when writing directly.

Re:How quickly can you break a long string into lines? by yetihehe on Monday April 29, 2024 @07:57AM (#40197190)
Curious question: would prefilling destination buffer with newlines (\n only) be faster than sprinkling them from a list of positions?