New UTF-8 stride function
Dmitry Olshansky
dmitry.olsh at gmail.com
Mon May 27 13:10:35 PDT 2013
27-May-2013 23:21, Martin Nowak пишет:
>
> On 05/26/2013 10:49 PM, Dmitry Olshansky wrote:
> > If there is anything that come out of UTF-8 discussion is that I decided
> > to dust off my experimental implementation of UTF-8 stride function.
> > Just for fun.
> >
> > The key difference vs std is in handling non-ASCII case.
> > I'm replacing bsr intrinsic with a what I call an "in-register lookup
> > table" (neat stuff that is a piece of cake, thx to CTFE).
> >
> > See unittest/benchmark here:
> > https://gist.github.com/blackwhale/5653927
> >
> Looks promising.
Cool, I'm not alone in this :)
The only definitive results so far is that it takes less cycles on 32
bit. For me AMD CodeAnalyst confirms this is literally in cycles of up
to 33% less with smaller samples in a loop. ASCII-only case seems to
stay more or less the same (at least cycle-wise but not in time...)
saving my sanity.
>
> These are huge and most likely the performance is limited by the memory
> bandwith.
>
That could be it. I'll be making measurement on smaller samples of said
files and spin on them. More tests to come tomorrow.
--
Dmitry Olshansky
More information about the Digitalmars-d
mailing list