D6594: RFC dirstatemap
raf at durin42.com
Mon Jul 8 13:21:17 EDT 2019
> On Jul 8, 2019, at 10:12, Yuya Nishihara <yuya at tcha.org> wrote:
>>> I heard boxing a PyObject has measurable cost,
>> Do you have a link to any benchmarks? I'd be interested.
> No number. IIRC, Augie tried to implement a parser by using nom, which
> was breezing fast, until converting parsed result back to PyObjects.
> I think we also have some cached PyObjects in our C extension.
I wrote an obsstore parser with nom and it was 100x faster than the C version, but then ended up 3x slower than the C version once we did all the copies into Python tuples. I didn't work super hard at it, so you could probably do better, but at the margin you've got some reasonably high costs in copying data into Python objects compared to the parse overhead.
More information about the Mercurial-devel