On Wednesday, May 31, 2017 12:13:04 H. S. Teoh via Digitalmars-d-learn wrote: > I did some digging around, and it seems that wc is using glibc's memchr, > which is highly-optimized, whereas std.algorithm.count just uses a > simplistic loop. Which is strange, because I'm pretty sure somebody > optimized std.algorithm some time ago to use memchr() instead of a loop > when searching for a byte value in an array. Whatever happened to > that??
I don't know, but memchr wouldn't work with CTFE, so someone might have removed it to make it work in CTFE (though that could be done with a different branch for CTFE). Or maybe it never made it into std.algorithm for one reason or another. - Jonathan M Davis