News for hackers. Stuff that matters.
Re:Six times faster than C by 414owen on Friday July 07, 2023 @03:26AM (#36628372)
I guess the question is whether the compiler should optimize a function containing a loop for a single null terminator, or for more data.

I would suggest the latter is what you want most of the time.

There's also the option of running a quick check for the null terminator before the loop, and then optimizing the loop for the other options.

But in any case, I think the demonstration of the technique of rearranging branches is interesting, and I needed a program to apply it to.

Re:Six times faster than C by cjensen on Friday July 07, 2023 @01:47PM (#36635508)
It was still worth reading. Every critic needs something to read and nitpick ;-)

Keep at it! Just as every program is a chance to improve programming, every article written is a chance to improve writing. It was well written.