[Python-Dev] Reordering opcodes (PEP 203 Augmented Assignment)
Vladimir Marangozov
Vladimir.Marangozov@inrialpes.fr
Fri, 28 Jul 2000 17:47:50 +0200 (CEST)
M.-A. Lemburg wrote:
>
> If you need help, I can dig up those old tools and patches...
Yes, please do. I think I'll come up with a patch posted to SF for
your collective review.
[Eric Reymond, on opcode stats by MAL]
> > LOAD_FAST(124) : 19323126 ================================
> > SET_LINENO(127) : 15055591 ========================
> > LOAD_CONST(100) : 9254683 ===============
> > LOAD_NAME(101) : 8218954 =============
> > ...
>
> Some thoughts:
>
> 1. That looks as close to a Poisson distribution as makes no difference.
> I wonder what that means?
Well, it's difficult to say what this means without looking at the tools
that were used to generate these stats.
>
> 2. Microtuning in the implementations of the top 3 opcodes looks indicated,
> as they seem to constitute more than 50% of all calls.
Imagine what will happen if SET_LINENO disappears <wink> But this is
very tricky business which is more complicated than it looks like...
>
> 3. On the other hand, what do you get when you weight these by average
> time per opcode?
I haven't run 100M opcodes, but you may want to have a look at some old
micro-profiling I did long time ago:
http://starship.python.net/~vlad/tprof/
The relevant file for the main loop is:
http://starship.python.net/~vlad/tprof/pybench-0.6/python-151-orig-thr/__t.eval_code2_ceval.c
I am not sure this makes any sense by now, though.
--
Vladimir MARANGOZOV | Vladimir.Marangozov@inrialpes.fr
http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252