[Python-Dev] [ANN] VPython 0.1
mal at egenix.com
Fri Oct 24 10:41:10 CEST 2008
On 2008-10-24 09:53, J. Sievers wrote:
> "M.-A. Lemburg" <mal at egenix.com> writes:
>> BTW: I hope you did not use pybench to get profiles of the opcodes.
>> That would most certainly result in good results for pybench, but
>> less good ones for general applications such as Django or Zope/Plone.
> Algorithm used for superinstruction selection:
> 1) idea: LOAD_CONST/LOAD_FAST + some suffix
> 2) potential suffixes:
> $ grep '..*(..*--..*)$' ceval.vmg | grep 'a1 a2 --' > INSTRUCTIONS
> 3) delete any instruction that I felt wouldn't be particularly frequent
> from INSTRUCTIONS (e.g. raise_varargs)
> 4) use awk to generate superinstruction definitions
> Not only is this relatively unbiased but also very low effort.
Well, the "I felt wouldn't be particularly frequent" part does sound
a bit biased, but you obviously made good choices ;-)
I thought you used the tracing functions that Vmgen provides for
determining which combinations occur more often. That's how I worked
back then - I instrumented the interpreter and then let it run for
a few days doing whatever I worked on or with at the time.
I then found that it makes sense to process LOAD_FAST completely
outside the switch statement and to move common opcodes such as
CALL_* to the switch with the most used opcodes. Inlining the code
for calling C functions/methods also made a difference, since most
calls in Python are to C functions/methods.
Professional Python Services directly from the Source (#1, Oct 24 2008)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
More information about the Python-Dev