This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Improve string benchtests


Hi Adhemerval,

> Space after cast.  As a side note, this won't evaluate wstpcpy as-is, since it
> will use an optimized version and it will result in a wrong generic name for
> wcscpy.

I'll have a look at that. Maybe we could create GENERIC_STPCPY from
concatenation of the STPCPY define. I want to avoid huge amounts of defines
leading to completely incomprehensible magic.

> And as a following cleanup for wcpcpy we can use the similar code for strcpy
> adjusting for wide-chars:

Sure, there are lots of generic string functions which aren't optimized yet. However
that's a different patch... This patch simply makes it easy to find those cases.

> Same as before for wcpncpy: instead of reimplement the generic implementation
> on benchtests we can just include them. And it also leads to an possible
> optimization on generic implementation for wcpncpy.

The point is to enable useful comparisons of string implementations. If we include
the generic implementation then we just compare the generic implementation with
itself in many cases. And that isn't useful. If I change a generic implementation I
want to see the difference that makes in the benchmark comparison rather than
showing no difference.

Maybe the name generic_xxx is confusing? It's meant to be the baseline,
something which you should beat in all cases with the actual implementation.

Cheers,
Wilco
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]