[SG16-Unicode] Performance of C interfaces (was: Re: SG16 meeting summary for August 21st, 2019)

Steve Downey sdowney at gmail.com
Mon Sep 2 23:53:16 CEST 2019


As pointer + length is span in essence, that makes sense. However I'm not
sure it's worth us persuing it, although I can see the value for C.
Making the ntmbs functions not broken has value, particularly since they
are, iirc, used in as if specification in places.

On Mon, Sep 2, 2019, 16:28 Henri Sivonen <hsivonen at hsivonen.fi> wrote:

> On Mon, Sep 2, 2019 at 2:00 AM JeanHeyd Meneide <phdofthehouse at gmail.com>
> wrote:
> >
> > On Sun, Sep 1, 2019 at 12:07 PM Steve Downey <sdowney at gmail.com> wrote:
> > >
> > > That was, if I recall correctly, about the C standard library
> interfaces in the Null-terminated multibyte strings section. Basically that
> the character at a time interfaces are not amenable to vectorization.
> ...
> >      With ptr + length, someone can optimize the resulting call as
> > much as they like. With null-terminated versions of the function, I am
> > skeptical the same performance can be achieved without first calling
> > strlen() but I have no experience or data to back up that intuition.
>
> I see.
>
> To me it seems clear that C APIs on this topic should use pointer and
> length.
>
> --
> Henri Sivonen
> hsivonen at hsivonen.fi
> https://hsivonen.fi/
> _______________________________________________
> SG16 Unicode mailing list
> Unicode at isocpp.open-std.org
> http://www.open-std.org/mailman/listinfo/unicode
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.open-std.org/pipermail/unicode/attachments/20190902/f5687256/attachment-0001.html 


More information about the Unicode mailing list