[RFC] Pure C bencode decoder [was: Re: [MERGE] BEncode Revision Serializer]
Martin Pool
mbp at canonical.com
Thu Aug 20 01:02:28 BST 2009
2009/8/19 Andrew Bennetts <andrew.bennetts at canonical.com>:
> If I substitute my C code for the Pyrex code the test_bencode tests still
> pass.
>
> In practice, the performance improvment this offers for bzr is probably
> pretty minimal, we don't (yet?) do a lot of bencode decoding. So I'm not at
> all convinced it's worth adding to bzrlib. But I wrote the code, so I may
> as well share it :)
Thanks for at least pushing and posting about it.
It's 28% faster which is not to be sneezed at, but you're right that
we probably don't do enough of this for it to show up in a macro
benchmark.
So we should perhaps look at merging it. Now you've written it, the
only costs would be doing the review and dealing with any fallout as
far as bugs or portability (though they might not be trivial.)
Merging it would mean that if people in future look at different
serializers they'll be making that comparison based on better data.
--
Martin <http://launchpad.net/~mbp/>
More information about the bazaar
mailing list