[MERGE] pyrex bencode implementation
Alexander Belchenko
bialix at ukr.net
Sun Aug 12 12:34:35 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Here is the patch for pyrex bencode version.
I create simple benchmark for tags serialization/deserialization
(i.e. indirect benchmark for bencode). This benchmark use
tags dictionary with 100 items.
Here results on my machine (CeleronM 1.7GHz Windows XP)
Pure python bencode:
906ms bzrlib.benchmarks.bench_tags.TagsBencodeBenchmark.test_deserialize_tags
656ms bzrlib.benchmarks.bench_tags.TagsBencodeBenchmark.test_serialize_tags
Pyrex version:
375ms bzrlib.benchmarks.bench_tags.TagsBencodeBenchmark.test_deserialize_tags
453ms bzrlib.benchmarks.bench_tags.TagsBencodeBenchmark.test_serialize_tags
These numbers are for 1000-iteration loop, so you need to divide time by 1000,
i.e. it's actually us not ms for 1 iteration.
As in my previous testing for generic data set, implementing bdecode in pyrex
give bigger win in performance. And IMO it's good, because read operations
executed more frequently.
- --
[µ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGvvBLzYr338mxwCURAt+VAKCWaiVns4UpvN63ufKtWJbC+UC21wCfd5f5
h1oq8KN18BvS1UtpJy2/mbk=
=CK7/
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bencode_pyx.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20070812/f48ffd99/attachment-0001.diff
More information about the bazaar
mailing list