Subject: Re: Incorrect sorting of Polish characters
From: Bart Schaefer <[email-masked]>
To: [email-masked]
Date: Thu, 21 Jul 2016 17:38:05 -0700
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Jul 20,  9:35am, Peter Stephenson wrote:
} Subject: Re: Incorrect sorting of Polish characters
}
} On Tue, 19 Jul 2016 22:05:08 -0700
} Bart Schaefer <[email-masked]> wrote:
} > Hm.  On a glob of 16794 files it's about 4% slower over 10 trials with
} > the extra pass over the array of matches.  I don't suppose there's some
} > way to store the original file name at the time metafication is applied
} > rather than metafying and then unmetafying again?
} 
} It already works like that, and it only copies and unmetafies if there's
} a Meta character.

What I meant was (now that I have poked around a bit further), maybe
zreaddir() should be able to return unmetatfied strings on request,
which scanner() could then metafy before calling pattry() and when a
match is found, pass both to insert() ?

Seems wasteful for zreaddir() to unconditionally metafy when the
caller may need the name unmetafied.  However, this does mean passing
both strings through a lot of layers, so maybe not worth it for 4%.

The strchr() does shave it down a fraction.