This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Optimize strstr, strcasestr and memmem
On Mon, May 21, 2012 at 4:11 PM, Maxim Kuvyrkov <email@example.com> wrote:
>> Could you please start a wiki page for this work if you haven't
>> already? That would help me point other people at the design and
> Done, http://sourceware.org/glibc/wiki/Testing/Benchmark is live.
Many thanks. This looks great!
>>> I'm tired of hand-tweaking iteration numbers for all the different systems out there.
>> What do you do if you exceed the runtime but are in the middle of an interation?
> Crash and burn. ?That should not normally happen as "TIMEOUT to kill" will be set at 1.5-2 times the value of benchmark time (or, rather, benchmark time will be set to a fraction of the TIMEOUT value as expected for "normal" tests). ?Provided that a single iteration of benchmark loop will be a small fraction of the overall time, benchmarks will end shortly after the benchmark alarm goes off and well before timeout.
Stopping after the last iteration completes makes perfect sense. Thanks.
TIMEOUT is just above the time it should take for a test to complete.
If the benchmark framework runs multiple iterations of the test then
it will need to set timeout to TIMEOUT*<Number of iterations>.
On top of that you should follow the normal protocol for extending
that timeout and if TIMEOUT_FACTOR is set then you should not stop
until TIMEOUT*TIMEOUT_FACTOR*<Number of iterations>.
Does that make sense?