[Scons-dev] SCons on pypy and slots and __class__ assignment

Bill Deegan bill at baddogconsulting.com
Mon Nov 16 08:32:57 EST 2015


Dirk,

Good point!
I'll give that a try.

-Bill

On Mon, Nov 16, 2015 at 1:50 AM, Dirk Bächle <tshortik at gmx.de> wrote:

> 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
>
> _______________________________________________
> Scons-dev mailing list
> Scons-dev at scons.org
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20151116/55e70856/attachment.html>


More information about the Scons-dev mailing list