[PATCH] shrink last_char_is function even more

Stefan Seyfried stefan.seyfried at googlemail.com
Thu Jul 16 05:53:32 UTC 2020

Am 09.07.20 um 21:13 schrieb Tito:
> On 7/9/20 9:56 PM, Martin Lewis wrote:
>> Please note that my original patch is still smaller:
>> http://lists.busybox.net/pipermail/busybox/2020-June/088026.html
> Hi,
> yes I know. This is smaller than what is in git now.
> I understood that Denis rejected your patch:
> "This scans the string twice, unnecessarily. Let's not do that."

I'd really like an explanation, because for me this sentence looks
wrong, I cannot see two scans, only one strrchr(). Or is strrchr so wrong?

Your speed test already showed that Martins version is faster, maybe
because of highly asm-optimized str* functions in glibc? Would be
interesting to benchmark on some old slow processor type ;-)
Stefan Seyfried

"For a successful technology, reality must take precedence over
 public relations, for nature cannot be fooled." -- Richard Feynman

More information about the busybox mailing list