thomas lee abkvectorsevencom hi ive working optimization ast including porting old bytecodelevel optimizations ast level questions come process probably appropriate discussion list code im referring found tleeastoptimize branch relevant code pythonoptimizec pythonpeepholec nearly bytecodelevel optimizations moved ast optimizer exceptions waiting ported stuck limbo due fact cant yet inject arbitrary pyobject constants ast examples tuples constants optimization load_globalload_name none load_const none leaves us options 1 new ast expr node constant values types strnum imagine something like constpyobject v effectively translated load_const v compiler trades purity ast little practicality const node real source representation would exist solely purpose injecting pyobject constants ast 2 allow arbitrary annotations applied ast compiler hints example ast node might optional dict contains set annotation values traversing ast compiler might something along lines exprannotations pyobject constvalue pydict_getitemstringexprannotations constantvalue constvalue addop_oc load_const constvalue consts else visitc expr expr general solution want keep compiler hints track unless somebody think another use case probably overkill 3 keep particular optimizations bytecode level would great able perform optimizations higher level would require effort would mean two passes code two different levels anybody familiar stuff could weigh matter would much appreciated ive got list issues need discuss would great start thanks tom _______________________________________________ pythondev mailing list zvlllneumpythonorg httpmailpythonorgmailmanlistinfopythondev unsubscribe httpmailpythonorgmailmanoptionspythondevpythondev40tangomucom fri 08 aug 2008 144259 1000 pythondev optimization python asts deal constant values