From: Leo U. <leo...@ya...> - 2007-01-09 21:50:50
|
This does appear to save time on its own, but when the lookup cache is put in place the time is essentially the same as using __getattr__. What Im hoping will be good is that it will help reduce the memory impact of having a lookup cache. Without using this we end up holding a bunch of PyMethod like objects in memory. By dispensing with their creation during invocation, this should eliminate that expense. On the other hand it is possible to hold onto the core function instance and build a method proxy off of that, eliminating the extra object held in memory as well. But it still leads to more garbage being produced than needed. leouser --- Leo User <leo...@ya...> wrote: > Actually, this may not be that terrible of thing to > experiment with after all. It appears that > visitCall > in CodeCompiler generates the __getattr__ call prior > to invoking __call__. Which means we might have a > very simple way of just passing the call along a > different route. > > leouser > > > --- Leo User <leo...@ya...> wrote: > > > Hi, > > > > One idea that may be worth pursuing is getting rid > > of > > this sequence: > > obj.something() > > > > which I believe turns into: > > lookup an attribute called "something" > > if a function, create a method object(I believe > this > > may be more general than a function) > > invoke the method object > > > > Im going to investigate compacting this down to: > > get the attribute called "something" and invoke > it. > > > > How successful this is going to be, don't know. > > From > > the looks of the lovely parser DOT operator turns > > into > > a call to __getattr__. () turns into a invocation > of > > __call__. I guess the critical point would be to > > have > > the DOT operator when parsed, peek ahead to see if > > there is a () somewhere at the end of the line. > > > > Ugh, I hate having to read meaningless names like > > jjtc001 and such(there's alot of them), > > leouser > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > > protection around > > http://mail.yahoo.com > > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of > IT > > Join SourceForge.net's Techsay panel and you'll > get > > the chance to share your > > opinions on IT & business topics through brief > > surveys - and earn cash > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > > Jython-dev mailing list > > Jyt...@li... > > > https://lists.sourceforge.net/lists/listinfo/jython-dev > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get > the chance to share your > opinions on IT & business topics through brief > surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Jython-dev mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-dev > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |