On Mon, May 13, 2002 at 06:52:37PM -0400, Cliff Woolley wrote: >... > to copy. And no, the compiler won't do an optimized memcpy here because > the length is not known at compile time. So it's a valid optimization.
Well, the *compiler* might not, but it can inline the assembler forms which do optimized copies (e.g. whole words at a time). > At the same time, the brigade_write() family can be tricky to maintain at > times. It's much better than it used to be (now that > check_brigade_flush() has been burned at the stake), though. > > So the real question is this: is it ever possible for strlen()+memcpy() to > be faster than the while loop used here? I believe the answer is no. I think the answer is yes :-) Thus, my request for actual numbers. We really cannot continue to add complexity to the codebase every time we want another 1% improvement. We'll end up with an unmaintainable codebase; it'll run wicked fast, but we won't be able to fix or improve it. Cheers, -g -- Greg Stein, http://www.lyra.org/