From: Samuele P. <ped...@st...> - 2006-12-05 21:24:04
|
Leo User wrote: > Oh yeah, > > this sure looks like it would slow things down. From > looking a quasi-simulation where the extra level of > indirection is timed against the one with one less > level, the switch statement can really add to the > times. > > leouser > > the current structuring is mostly because generating code for self-contained classes, vs this switch structure was slightly easier. Also indeed it may be faster than other approaches. It also depends how good jvms are at coping with many classes, which I suppose they should be reasonable at. OTOH startup time was never a major consideration, is essentially a lost race vs. CPython. > --- Leo User <leo...@ya...> wrote: > > >> Hi, >> >> I was looking at the generated code in typeSetup. >> It >> seems that for many(all?) the methods in the types >> there is a corresponding class created just for the >> sake of invoking a method on the "self" object. >> That's alot of class fat put into place just for >> that. >> So, Im curious if anyone has looked at other >> schemes >> for this? >> >> One idea Ive been thinking about is instead of >> creating a class for each is to have a generic >> routing >> class. The router would invoke a general method on >> each type with a int that corresponds to an int. >> The >> routing method in turn would take the information >> and >> invoke the right method. This probably would cut >> down >> on the fat and may speed up load time a little but >> it >> may end up slowing down things somewhat(it would >> have >> to be tested of course). >> >> leouser >> >> >> >> >> > ____________________________________________________________________________________ > >> Need a quick answer? Get one in minutes from people >> who know. >> Ask your question on www.Answers.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!? > Everyone is raving about the all-new Yahoo! Mail beta. > http://new.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 > |