Here’s my prototype. Reviews welcome:
I’ve tried this out on a microlevel for attrs (going all-in requires significant refactorings) and got speed improvements of 19 us between compiling the default methods one by one vs all one once. That’s approximately a 10% speedup: bench_eval.py · GitHub
However the whole class takes 461 us so the 19 us are only ~4%. Might still be worth it, depending on the amount of complexity the refactoring would cause.