[PATCH v3] faster strlen on x64
Ondřej Bílka
neleai@seznam.cz
Wed Feb 6 17:24:00 GMT 2013
On Wed, Feb 06, 2013 at 11:18:06AM -0500, Carlos O'Donell wrote:
> On 02/05/2013 06:44 PM, OndÅej BÃlka wrote:
> > My implementation takes profiling information (see http://kam.mff.cuni.cz/~ondra/benchmark_string/profile/result.html for my workload.)
> > into account. Important property there is that most strings are at most
> > 80 bytes large.
>
> I think this information is really important.
>
> How did you profile this?
>
I use two tools that do profiling. I generated these statistics with
https://github.com/neleai/benchmark_string directory profile.
It is in hacky state with several problems, it has relatively big
constant overhead when writing results. I do not use it to collect
timing information. Also malloc profiling is not entirely stable.
I based on it http://kam.mff.cuni.cz/~ondra/strlen_profile.tar.bz2
that compares strlen only and can measure time with minimal overhead.
To use it
Download profiler at http://kam.mff.cuni.cz/~ondra/strlen_profile.tar.bz2
run make
This compiles it and displays usage information.
I collect information on everything that I run by adding
LD_PRELOAD=displayed directory
export LD_PRELOAD
into .bashrc
To generate results directory from collected data run
make rep
To zero data run
make reset
> I see that your workload is ~10 applications.
>
This is technical limitation that I use fixed array with top 10 entries.
> Can another user run this to get their statistics?
As above.
>
> Cheers,
> Carlos.
More information about the Libc-alpha
mailing list