Re: strings

From: Willy Tarreau
Date: Fri Apr 21 2023 - 02:34:55 EST


[dropped innocents from the CC list]

On Fri, Apr 21, 2023 at 11:20:58AM +0700, Bagas Sanjaya wrote:
> On Thu, Apr 20, 2023 at 03:58:47AM +0100, André Coelho wrote:
> > greeting...if youre interessed in string algorihtm check
> >
> > https://andrealbergaria.github.io/
> >
>
> Looks like above link is about hex arithmetic implemented using strings,
> right?

It looks more like a reinvention of the classical multi-byte string
processing (memcmp, memcpy, memmove etc).

> Also, on what use cases can your idea fit the kernel context? Or doesn't the
> kernel already have the implementation yet?

Sure it does, look at __crypto_memneq() for example, or more generally
at any memcmp() or memcpy() implementation from the last 30 years, for
example in glibc.

Regards,
Willy