On Sun, Feb 19, 2012 at 02:34:22AM -0300, Claudio Freire wrote: > On Sun, Feb 19, 2012 at 12:48 AM, Michael Bayer > <mike...@zzzcomputing.com> wrote: > > Optimizing InstanceState while maintaining it's current behavioral contract > > exactly would be a lot more straightforward, requiring no complications to > > internals, API or documentation story. Methods here include experimenting > > with various forms of inlining inside of __setstate__() (such as inlining > > the call to setup_instance() when the default instrumentation manager is in > > use) as well as experimenting with a C port. There's not much that happens > > inside of __setstate__() as it is. > > I've managed quite efficient inlining with bytecode magic. It's especially > effective with SQLA code, since it also specializes the inlined function, > removing a lot of dead code (in the call context).
That's pretty interesting! > I could share the code if you're interested, but it is rather hard to > maintain (it's tied to the bytecode, which is version-specific in CPython) > and it's experimental code, so it's rather ugly. Yeah, that would be great, thanks! -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.