I notice that the gnulib fnmatch implementation is slower than the regex implementation, at least in those cases where a pattern can be compiled once and offered thousands of times. Very roughly, I'd guess that the fnmatch implementation takes about 1.4x the time that the regex implementation takes.
Is there a known reason for this, is it avoidable, or are we stuck with it? I was considering figuring out how to rewrite globs as regexes, but thought I'd ask first... Thanks, James.