[Scons-dev] SCons on pypy and slots and __class__ assignment
Dirk Bächle
tshortik at gmx.de
Mon Nov 16 01:50:46 EST 2015
Bill,
On 15.11.2015 23:36, Bill Deegan wrote:
> Greetings,
>
> Thought I'd take a whack at running SCons on pypy (based on a presentation at SFPython where the developer say 50x CPython speeds).
>
> Anyway it turns out that using __slots__ + assiging to __class__ which we do a few places in the Node's classes causes:
> TypeError: __class__ assignment: 'Entry' object layout differs from 'Dir':
>
> I hopped on #pypy and a developer there took a quick look as said turning of __slot__ got it a bit further through.
>
> As a side note, the canonical way to tell if you are running under pypy is as follows:
>
> if '__pypy__' not in sys.builtin_module_names
>
> Anyone have any thoughts on the relative difficulties of disabling slots for pypy vs removing reassigning an objects class in the
> Nodes hierarchy?
>
since you're only interested in the possible speedup of pypy vs. cpython, wouldn't it be an option to use a commit short before the
introduction of "__slots__" and apply the PR #252 there in a sandbox?
Then you could first check whether following this route, and fixing things for the __class__ assignments, would be worthwhile...
Best regards,
Dirk
More information about the Scons-dev
mailing list