[Python-checkins] r46083 - sandbox/trunk/stringbench sandbox/trunk/stringbench/stringbench.py

M.-A. Lemburg mal at egenix.com
Tue May 23 12:53:32 CEST 2006


Fredrik Lundh wrote:
> M.-A. Lemburg wrote:
> 
>>> "Need for speed" microbenchmarks for string processing
>> Why don't you add these to pybench which is now part of Python
>> (see Tools/pybench/) ?!
> 
> stringbench is designed to compare 8-bit and unicode
> implementations of the same operations, and to compare
> similar operations (e.g. in vs. find vs. index).
> 
> the pybench output isn't really useful for this kind of
> benchmarking.

Why not ?

pybench is designed to compare things on a
low-level basis. It's easy to write tests that execute
everything on string and then do the same on Unicode,
in fact Strings.py and Unicode.py do just that.

If you compare what you've written in stringbench.py
to what's in Strings.py and Unicode.py you'll find quite
a few similarities.

But hey, this was just a suggestion since pybench
already provides a complete framework for micro-benchmarks,
including side-by-side comparisons between different runs.

> (and pybench is also extremely unreliable if you look at
> individual tests; more about that later).

Hmm, awaiting your evidence ;-)

For me, pybench has proven to be very reliable and was
specifically designed to allow comparisons based on
individual tests rather than some abstract benchmark
figure like pystone and many other benchmark tests
provide.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, May 23 2006)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
2006-07-03: EuroPython 2006, CERN, Switzerland              40 days left

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::


More information about the Python-checkins mailing list