Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
RFC: Implement user classes with __slots__ #3392
This implements support for use classes with
I initial though it would require changes to the compiler, but it doesn't.
Note also the that initially I had mp_obj_slotted_make_new(), but that required splitting existing mp_obj_instance_make_new() for reuse and passing more args to (additional stack usage), plus some other minor issue. So, I reworked it to keep one mp_obj_instance_make_new(), the drawback of that is that it needs to lookup
Looks interesting. Do you have measurements of space savings/performance gains (which is significant in CPython)? Can you lay out the dfferences with CPython (e.g. with te latter if you assign
Yeah, this was for a long time in #1331, and IMHO an important part to make the core "complete" (given our focus of low-memory systems).
No, I don't. This is just an initial, proof of concept patch. But the expected gains are known: it asymptotically saves 50% of RAM on objects (because normal
This just implements