PyPy now "just works" with @

Gregory Szorc gregory.szorc at gmail.com
Sat Dec 5 20:22:48 CST 2015


On Sat, Dec 5, 2015 at 5:14 PM, Pierre-Yves David <
pierre-yves.david at ens-lyon.org> wrote:

> On 12/05/2015 01:30 PM, Bryan O'Sullivan wrote:
>
>> Very interesting, and thank you for putting in the work to get this going.
>>
>> What's the effect of startup time on fast-running commands? A majority
>> of Mercurial invocations take a fraction of a second even on a huge
>> repo, so this is of significant interest.
>>
>
> Basic testing around status and diff show that pypy is still significantly
> slower on basic operation (even pretty bad hit for diff).
>
> My mercurial repository
> ------------------------
> status
> python-2.7: 0.040
> pypy-4.0.1: 0.260
>
> diff:
> python-2.7: 0.460
> pypy-4.0.1: 0.980
>
> A Mozilla central clone
> ------------------------
> status:
> python-2.7: 0.710
> pypy-4.0.1: 1.770
>
> diff:
> python-2.7: 1.130
> pypy-4.0.1: 8.880
>
> log: (252524 changesets)
> python-2.7: 60.710
> pypy-4.0.1: 13.200
>
> Some revset:
> log --rev 'author(greg) - merge()' (2748 match)
> python-2.7: 17.740
> pypy-4.0.1: 8.360
>
> From here we can explore multiple path:
>
> - routing different commands to different implementation,
> - getting chg production ready (mostly a life cycle question at that
> point),
> - grabbing the low hanging fruit to have pypy happier,
> - Getting the pypy devs to look at the less trivial work,
>

It's worth noting that both status and diff also measure differences
between Mercurial's C and Python implementations, not merely startup
overhead and PyPy's JIT "warmup" impact. For example, if you profile `hg
status` for mozilla-central, you'll find that PyPy spends a lot more time
in calling osutil.listdir(). The difference walking the filesystem account
for ~75% of the overhead of PyPy on my machine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20151205/f4a1d393/attachment.html>


More information about the Mercurial-devel mailing list