On Tue, Nov 24, 2015 at 7:29 PM, William A Rowe Jr <wr...@rowe-clan.net> wrote:
>
> I'm wondering the other way around.  Even in Yann's latest exercise,
> simply testing
>
>    if ((*ps1 == *ps2) || (ucharmap[*ps1] != ucharmap[*ps2])) {
>
> (or in Yann's code, use the const int lookups, considering that they
> should be optimized out by the compiler if the first pattern matches).

*blink*
Actually the "indexed" function in my test does not include the
translation, just realized that while wanted to include your proposed
change.

-       const int c1 = ps1[i];
-       const int c2 = ps2[i];
+       const int c1 = ucharmap[ps1[i]];
+       const int c2 = ucharmap[ps2[i]];

So now it's just a tiny faster than Jim's, not worth the commit :) but
for -Os maybe...

BTW, I'll test your change with the original version.

Reply via email to