I concur, I don't want to see a plethora of "isnumber" "ismaybeanumber" bullshit in the tree that do the same thing "isdigit" does.. if for whatever reason we want isdigit to be more efficient because the most important thing I have to do is make shell sleep more efficient, we should fix isdigit, or the locale poo..
But for sure not introduce non-standard ascii-only replacements into all code that do not quite what libc does.. Jesus ted did you learn nothing from OpenSSL? :) On Sun, Sep 20, 2015 at 8:27 PM, Philip Guenther <guent...@gmail.com> wrote: > On Sun, Sep 20, 2015 at 6:49 PM, Ted Unangst <t...@tedunangst.com> wrote: >> /bin/sleep does a lot more work than you'd expect (just ktrace it). >> >> this is because it calls setlocale(). apparently so that isdigit() doesn't >> get >> confused by wacky foreigners with funny numbers. >> >> there is another solution, given that the problem of identifying digits is >> not >> particularly challenging. do it ourselves. >> >> cuts an entire banana boat of calls out of ktrace. > > I think this is the wrong direction. We want better support for > locales and UTF-8: if the current support is inefficient then we > should be fixing that, not disabling it. > > > Philip Guenther >