[issue14419] Faster ascii decoding

Serhiy Storchaka report at bugs.python.org
Tue Mar 27 23:17:42 CEST 2012


Serhiy Storchaka <storchaka at gmail.com> added the comment:

Python script too rough tool to measure decoding performance on short strings. To do this I used C.

The benchmark scheme is as follows. Taken a big enough chunk of memory to reduce effect of processor cache. This area is splitted into many pieces with the same offset over long aligned block. Then measured a time of decoding all pieces of a certain size with a certain offset. Calculated an average time (ms) and decoding speed (MB/s).

Run benchmark:
gcc -Wall -O3 -I Include/ -I . -Xlinker -export-dynamic decode_ascii_bench.c libpython3.3m.a -lpthread -ldl -lutil -lm -lrt -o decode_ascii_bench && ./decode_ascii_bench

----------
Added file: http://bugs.python.org/file25050/decode_ascii_bench.c

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14419>
_______________________________________


More information about the Python-bugs-list mailing list