Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Dev

A wordcode-based Python

 

 

Python dev RSS feed   Index | Next | Previous | View Threaded


cesare.dimauro at a-tono

May 11, 2009, 11:00 AM

Post #1 of 13 (899 views)
Permalink
A wordcode-based Python

At the last PyCon3 at Italy I've presented a new Python implementation,
which you'll find at http://code.google.com/p/wpython/

WPython is a re-implementation of (some parts of) Python, which drops
support for bytecode in favour of a wordcode-based model (where a is word
is 16 bits wide).

It also implements an hybrid stack-register virtual machine, and adds a
lot of other optimizations.

The slides are available in the download area, and explain the concept of
wordcode, showing also how work some optimizations, comparing them with
the current Python (2.6.1).

Unfortunately I had not time to make extensive benchmarks with real code,
so I've included some that I made with PyStone, PyBench, and a couple of
simple recoursive function calls (Fibonacci and Factorial).

This is the first release, and another two are scheduled; the first one to
make it possibile to select (almost) any optimization to be compiled (so
fine grained tests will be possibile).

The latter will be a rewrite of the constant folding code (specifically
for tuples, lists and dicts), removing a current "hack" to the python type
system to make them "hashable" for the constants dictionary used by
compile.c.

Then I'll start writing some documentation that will explain what parts of
code are related to a specific optimization, so that it'll be easier to
create patches for other Python implementations, if needed.

You'll find a bit more informations in the "README FIRST!" file present
into the project's repository.

I made so many changes to the source of Python 2.6.1, so feel free to ask
me for any information about them.

Cheers
Cesare
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


solipsis at pitrou

May 11, 2009, 1:27 PM

Post #2 of 13 (857 views)
Permalink
Re: A wordcode-based Python [In reply to]

Hi,

> WPython is a re-implementation of (some parts of) Python, which drops
> support for bytecode in favour of a wordcode-based model (where a is word
> is 16 bits wide).

This is great!
Have you planned to port in to the py3k branch? Or, at least, to trunk?
Some opcode and VM optimizations have gone in after 2.6 was released, although
nothing as invasive as you did.

About the CISC-y instructions, have you tried merging the fast and const arrays
in frame objects? That way, you need less opcode space (since e.g.
BINARY_ADD_FAST_FAST will cater with constants as well as local variables).

Regards

Antoine.


_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


collinw at gmail

May 11, 2009, 2:14 PM

Post #3 of 13 (860 views)
Permalink
Re: A wordcode-based Python [In reply to]

Hi Cesare,

On Mon, May 11, 2009 at 11:00 AM, Cesare Di Mauro
<cesare.dimauro [at] a-tono> wrote:
> At the last PyCon3 at Italy I've presented a new Python implementation,
> which you'll find at http://code.google.com/p/wpython/

Good to see some more attention on Python performance! There's quite a
bit going on in your changes; do you have an
optimization-by-optimization breakdown, to give an idea about how much
performance each optimization gives?

Looking over the slides, I see that you still need to implement
functionality to make test_trace pass, for example; do you have a
notion of how much performance it will cost to implement the rest of
Python's semantics in these areas?

Also, I checked out wpython at head to run Unladen Swallow's
benchmarks against it, but it refuses to compile with either gcc 4.0.1
or 4.3.1 on Linux (fails in Python/ast.c). I can send you the build
failures off-list, if you're interested.

Thanks,
Collin Winter
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


cesare.dimauro at a-tono

May 11, 2009, 11:42 PM

Post #4 of 13 (847 views)
Permalink
Re: A wordcode-based Python [In reply to]

On Mon, May 11, 2009 10:27PM, Antoine Pitrou wrote:

Hi Antoine

> Hi,
>
>> WPython is a re-implementation of (some parts of) Python, which drops
>> support for bytecode in favour of a wordcode-based model (where a is
>> word
>> is 16 bits wide).
>
> This is great!
> Have you planned to port in to the py3k branch? Or, at least, to trunk?

It was my idea too, but first I need to take a deep look at what parts
of code are changed from 2.6 to 3.0.
That's because I don't know how much work is required for this
"forward" port.

> Some opcode and VM optimizations have gone in after 2.6 was released,
> although
> nothing as invasive as you did.

:-D Interesting.

> About the CISC-y instructions, have you tried merging the fast and const
> arrays
> in frame objects? That way, you need less opcode space (since e.g.
> BINARY_ADD_FAST_FAST will cater with constants as well as local
> variables).
>
> Regards
>
> Antoine.

It's an excellent idea, that needs exploration.

Running my stats tools against all .py files found in Lib and Tools
folders, I discovered that the maximum index used for fast/locals
is 79, and 1853 for constants.

So if I find a way to easily map locals first and constants following
in the same array, your great idea can be implemented saving
A LOT of opcodes and reducing ceval.c source code.

I'll work on that after the two releases that I planned.

Thanks for your precious suggestions!

Cesare

_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


cesare.dimauro at a-tono

May 11, 2009, 11:54 PM

Post #5 of 13 (857 views)
Permalink
Re: A wordcode-based Python [In reply to]

Hi Collin

On Mon, May 11, 2009 11:14PM, Collin Winter wrote:
> Hi Cesare,
>
> On Mon, May 11, 2009 at 11:00 AM, Cesare Di Mauro
> <cesare.dimauro [at] a-tono> wrote:
>> At the last PyCon3 at Italy I've presented a new Python implementation,
>> which you'll find at http://code.google.com/p/wpython/
>
> Good to see some more attention on Python performance! There's quite a
> bit going on in your changes; do you have an
> optimization-by-optimization breakdown, to give an idea about how much
> performance each optimization gives?

I planned it in the next release that will come may be next week.

I'll introduce some #DEFINEs and #IFs in the code, so that
only specific optimizations will be enabled.

> Looking over the slides, I see that you still need to implement
> functionality to make test_trace pass, for example; do you have a
> notion of how much performance it will cost to implement the rest of
> Python's semantics in these areas?

Very little. That's because there are only two tests on test_trace that
don't pass.

I think that the reason stays in the changes that I made in the loops.
With my code SETUP_LOOP and POP_BREAK are completely
removed, so the code in settrace will failt to recognize the loop and
the virtual machine crashes.

I'll fix it in the second release that I have planned.

> Also, I checked out wpython at head to run Unladen Swallow's
> benchmarks against it, but it refuses to compile with either gcc 4.0.1
> or 4.3.1 on Linux (fails in Python/ast.c). I can send you the build
> failures off-list, if you're interested.
>
> Thanks,
> Collin Winter

I'm very interested, thanks. That's because I worked only on Windows
machines, so I definitely need to test and fix it to let it run on any other
platform.

Cesare
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


solipsis at pitrou

May 12, 2009, 4:40 AM

Post #6 of 13 (845 views)
Permalink
Re: A wordcode-based Python [In reply to]

Hi Cesare,

Cesare Di Mauro <cesare.dimauro <at> a-tono.com> writes:
>
> It was my idea too, but first I need to take a deep look at what parts
> of code are changed from 2.6 to 3.0.
> That's because I don't know how much work is required for this
> "forward" port.

If you have some questions or need some help, send me a message.

Regards

Antoine.


_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


cesare.dimauro at a-tono

May 12, 2009, 4:45 AM

Post #7 of 13 (841 views)
Permalink
Re: A wordcode-based Python [In reply to]

On Thu, May 12, 2009 01:40PM, Antoine Pitrou wrote:
>
> Hi Cesare,
>
> Cesare Di Mauro <cesare.dimauro <at> a-tono.com> writes:
>>
>> It was my idea too, but first I need to take a deep look at what parts
>> of code are changed from 2.6 to 3.0.
>> That's because I don't know how much work is required for this
>> "forward" port.
>
> If you have some questions or need some help, send me a message.
>
> Regards
>
> Antoine.

OK, thanks. :)

Another note. Fredrik Johansson let me note just few minutes ago that I've
compiled my sources without PGO optimizations enabled.

That's because I used Visual Studio Express Edition.

So another gain in performances can be obtained. :)

cheers
Cesare
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


collinw at gmail

May 12, 2009, 8:27 AM

Post #8 of 13 (832 views)
Permalink
Re: A wordcode-based Python [In reply to]

On Tue, May 12, 2009 at 4:45 AM, Cesare Di Mauro
<cesare.dimauro [at] a-tono> wrote:
> Another note. Fredrik Johansson let me note just few minutes ago that I've
> compiled my sources without PGO optimizations enabled.
>
> That's because I used Visual Studio Express Edition.
>
> So another gain in performances can be obtained. :)

FWIW, Unladen Swallow experimented with gcc 4.4's FDO and got an
additional 10-30% (depending on the benchmark). The training load is
important, though: some training sets offered better performance than
others. I'd be interested in how MSVC's PGO compares to gcc's FDO in
terms of overall effectiveness. The results for gcc FDO with our
2009Q1 release are at the bottom of
http://code.google.com/p/unladen-swallow/wiki/Releases.

Collin Winter
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


cesare.dimauro at a-tono

May 12, 2009, 9:41 AM

Post #9 of 13 (833 views)
Permalink
Re: A wordcode-based Python [In reply to]

On Tue, May 12, 2009 05:27 PM, Collin Winter wrote:
> On Tue, May 12, 2009 at 4:45 AM, Cesare Di Mauro
> <cesare.dimauro [at] a-tono> wrote:
>> Another note. Fredrik Johansson let me note just few minutes ago that
>> I've
>> compiled my sources without PGO optimizations enabled.
>>
>> That's because I used Visual Studio Express Edition.
>>
>> So another gain in performances can be obtained. :)
>
> FWIW, Unladen Swallow experimented with gcc 4.4's FDO and got an
> additional 10-30% (depending on the benchmark). The training load is
> important, though: some training sets offered better performance than
> others. I'd be interested in how MSVC's PGO compares to gcc's FDO in
> terms of overall effectiveness. The results for gcc FDO with our
> 2009Q1 release are at the bottom of
> http://code.google.com/p/unladen-swallow/wiki/Releases.
>
> Collin Winter

Unfortunately I can't test PGO, since I use the Express Editions of VS.
May be Martin or othe mainteners of the Windows versions can help here.

However it'll be difficult to find a good enough profile for the binaries
distributed for the official Python. FDO brings to quite different results
based on the profile selected.

cheers,
Cesare
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


mrts.pydev at gmail

Nov 4, 2009, 4:20 AM

Post #10 of 13 (265 views)
Permalink
Re: A wordcode-based Python [In reply to]

On Tue, May 12, 2009 at 8:54 AM, Cesare Di Mauro
<cesare.dimauro [at] a-tono> wrote:
>> Also, I checked out wpython at head to run Unladen Swallow's
>> benchmarks against it, but it refuses to compile with either gcc 4.0.1
>> or 4.3.1 on Linux (fails in Python/ast.c). I can send you the build
>> failures off-list, if you're interested.
>>
>> Thanks,
>> Collin Winter
>
> I'm very interested, thanks. That's because I worked only on Windows
> machines, so I definitely need to test and fix it to let it run on any other
> platform.
>
> Cesare

Re-animating an old discussion -- Cesare, any news on the wpython front?

I did a checkout from http://wpython.googlecode.com/svn/trunk and
was able to ./configure and make successfully on my 64-bit Linux box
as well as to run the Unladen benchmarks.

Given svn co http://svn.python.org/projects/python/tags/r261 in py261
and svn co http://wpython.googlecode.com/svn/trunk in wpy,

$ python unladen-tests/perf.py -rm --benchmarks=-2to3,all py261/python
wpy/python

gives the following results:

Report on Linux foo 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16
14:05:01 UTC 2009 x86_64
Total CPU cores: 2

ai:
Min: 0.640516 -> 0.586532: 9.20% faster
Avg: 0.677346 -> 0.632785: 7.04% faster
Significant (t=4.336740, a=0.95)
Stddev: 0.05839 -> 0.08455: 30.94% larger

Mem max: 7412.000 -> 6768.000: 9.52% smaller
Usage over time: http://tinyurl.com/ykwhmcc


call_simple:
Min: 1.880816 -> 1.701622: 10.53% faster
Avg: 1.944320 -> 1.778701: 9.31% faster
Significant (t=14.323045, a=0.95)
Stddev: 0.09885 -> 0.06000: 64.74% smaller

Mem max: 8100.000 -> 6636.000: 22.06% smaller
Usage over time: http://tinyurl.com/yzsswgp


django:
Min: 1.287158 -> 1.315700: 2.17% slower
Avg: 1.330423 -> 1.366978: 2.67% slower
Significant (t=-4.475769, a=0.95)
Stddev: 0.05663 -> 0.05885: 3.78% larger

Mem max: 15508.000 -> 16228.000: 4.44% larger
Usage over time: http://tinyurl.com/yfpbmjn


iterative_count:
Min: 0.211620 -> 0.124646: 69.78% faster
Avg: 0.222778 -> 0.159868: 39.35% faster
Significant (t=9.291635, a=0.95)
Stddev: 0.04239 -> 0.05279: 19.69% larger

Mem max: 7388.000 -> 6680.000: 10.60% smaller
Usage over time: http://tinyurl.com/yj7s8h4


normal_startup:
Min: 1.060017 -> 0.991366: 6.92% faster
Avg: 1.189612 -> 1.170067: 1.67% faster
Significant (t=2.002086, a=0.95)
Stddev: 0.06942 -> 0.06864: 1.13% smaller

Mem max: 3252.000 -> 4648.000: 30.03% larger
Usage over time: http://tinyurl.com/ygo3bwt


pickle:
Min: 2.027566 -> 1.948784: 4.04% faster
Avg: 2.051633 -> 2.043656: 0.39% faster
Not significant
Stddev: 0.03095 -> 0.07348: 57.88% larger

Mem max: 8544.000 -> 7340.000: 16.40% smaller
Usage over time: http://tinyurl.com/ykg9dn2


pickle_dict:
Min: 1.658693 -> 1.656844: 0.11% faster
Avg: 1.689483 -> 1.698176: 0.51% slower
Not significant
Stddev: 0.16945 -> 0.09403: 80.20% smaller

Mem max: 6716.000 -> 7636.000: 12.05% larger
Usage over time: http://tinyurl.com/yjhyame


pickle_list:
Min: 0.919083 -> 0.894758: 2.72% faster
Avg: 0.956513 -> 0.921314: 3.82% faster
Significant (t=2.131237, a=0.95)
Stddev: 0.12744 -> 0.10506: 21.31% smaller

Mem max: 6804.000 -> 8792.000: 22.61% larger
Usage over time: http://tinyurl.com/ylc3ezf


pybench:
Min: 58781 -> 50836: 15.63% faster
Avg: 60009 -> 51788: 15.87% faster

regex_compile:
Min: 0.934131 -> 0.862323: 8.33% faster
Avg: 0.962159 -> 0.884848: 8.74% faster
Significant (t=13.587168, a=0.95)
Stddev: 0.04685 -> 0.03229: 45.11% smaller

Mem max: 12584.000 -> 12740.000: 1.22% larger
Usage over time: http://tinyurl.com/yjngu8j


regex_effbot:
Min: 0.130686 -> 0.122483: 6.70% faster
Avg: 0.143453 -> 0.138078: 3.89% faster
Not significant
Stddev: 0.01864 -> 0.03177: 41.32% larger

Mem max: 7652.000 -> 6660.000: 14.89% smaller
Usage over time: http://tinyurl.com/ykcgntf


regex_v8:
Min: 0.135130 -> 0.150092: 9.97% slower
Avg: 0.138027 -> 0.177309: 22.15% slower
Significant (t=-8.197595, a=0.95)
Stddev: 0.00258 -> 0.04785: 94.60% larger

Mem max: 11124.000 -> 12236.000: 9.09% larger
Usage over time: http://tinyurl.com/ykb5vzu


rietveld:
Min: 0.848245 -> 0.816473: 3.89% faster
Avg: 1.033925 -> 1.019889: 1.38% faster
Not significant
Stddev: 0.11242 -> 0.13006: 13.56% larger

Mem max: 23792.000 -> 24548.000: 3.08% larger
Usage over time: http://tinyurl.com/yhdvz5v


slowpickle:
Min: 0.876736 -> 0.800203: 9.56% faster
Avg: 0.932808 -> 0.870577: 7.15% faster
Significant (t=5.020426, a=0.95)
Stddev: 0.05600 -> 0.11059: 49.36% larger

Mem max: 7200.000 -> 7276.000: 1.04% larger
Usage over time: http://tinyurl.com/ykt2brq


slowspitfire:
Min: 1.029100 -> 0.948458: 8.50% faster
Avg: 1.062486 -> 1.020777: 4.09% faster
Significant (t=4.581669, a=0.95)
Stddev: 0.05441 -> 0.07298: 25.44% larger

Mem max: 139792.000 -> 129264.000: 8.14% smaller
Usage over time: http://tinyurl.com/yh7vmlh


slowunpickle:
Min: 0.411744 -> 0.356784: 15.40% faster
Avg: 0.444638 -> 0.393261: 13.06% faster
Significant (t=7.009269, a=0.95)
Stddev: 0.04147 -> 0.06044: 31.38% larger

Mem max: 7132.000 -> 7848.000: 9.12% larger
Usage over time: http://tinyurl.com/yfwvz3g


startup_nosite:
Min: 0.664456 -> 0.598770: 10.97% faster
Avg: 0.933034 -> 0.761228: 22.57% faster
Significant (t=20.660776, a=0.95)
Stddev: 0.09645 -> 0.06728: 43.37% smaller

Mem max: 1940.000 -> 1940.000: -0.00% smaller
Usage over time: http://tinyurl.com/yzzxcmd


threaded_count:
Min: 0.220059 -> 0.138708: 58.65% faster
Avg: 0.232347 -> 0.156120: 48.83% faster
Significant (t=23.804797, a=0.95)
Stddev: 0.01889 -> 0.02586: 26.96% larger

Mem max: 6460.000 -> 7664.000: 15.71% larger
Usage over time: http://tinyurl.com/yzm3awu


unpack_sequence:
Min: 0.000129 -> 0.000120: 7.57% faster
Avg: 0.000218 -> 0.000194: 12.14% faster
Significant (t=3.946194, a=0.95)
Stddev: 0.00139 -> 0.00128: 8.13% smaller

Mem max: 18948.000 -> 19056.000: 0.57% larger
Usage over time: http://tinyurl.com/yf8es3f


unpickle:
Min: 1.191468 -> 1.206198: 1.22% slower
Avg: 1.248471 -> 1.281957: 2.61% slower
Significant (t=-2.658526, a=0.95)
Stddev: 0.05513 -> 0.11325: 51.32% larger

Mem max: 7776.000 -> 8676.000: 10.37% larger
Usage over time: http://tinyurl.com/yz96gw2


unpickle_list:
Min: 0.922200 -> 0.861167: 7.09% faster
Avg: 0.955964 -> 0.976829: 2.14% slower
Not significant
Stddev: 0.04374 -> 0.21061: 79.23% larger

Mem max: 6820.000 -> 8324.000: 18.07% larger
Usage over time: http://tinyurl.com/yjbraxg

---

The diff between the two trees is at
http://dpaste.org/RpIv/

Best,
Mart Sõmermaa
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


cesare.di.mauro at gmail

Nov 4, 2009, 5:30 AM

Post #11 of 13 (267 views)
Permalink
Re: A wordcode-based Python [In reply to]

Hi Mart

I had some problems and little time to dedicate to wpython in the last
period, but I restarted again with it in the last month.

Currently I'm working on changing and documenting the code so that almost
every optimization can be selected. So you'll compile it enabling only the
ones you are interested in.

I've also investigated about some ideas which Antoine told me on grouping
together FASTs and CONSTs in order to reduce bytecodes, but I've found that
the suggested solution brings some problems with the current function call
implementation that can hurt performance on some situations (mostly with
recursive ones, because usually they need to create new frames, and
constants references must be copied and INCREFed).
Since it will require huge changes to the current code base, I don't know if
it's worth the effort just to verify the idea. I'll think about it when the
project will be "finalized".

My plan is to finish the current work in a few days, and then remove the
(may be ugly) hacks that I made to the Python object model that were needed
to let tuples, lists and dictionaries be loaded as CONSTs.
May be a the end of the month it'll be fixed (and the diffs against CPython
will be reduced a lot, since a few files results changed).

Next, I need to changed the trace code (in frameobject.c) to let the
test_trace.py pass (at this time two tests are disabled because the VM
crashes).

Finally, I think to update the code base to 2.6.4.

I think to release everything at the end of the year, but if someone is
interested I can do a partial release at the end of November.

Regarding your tests, they are very interesting, particularly for regex_v8
that showed an unexpected result for me. I'll investigate about it after
I'll release wpython.

I you have any questions, I'm at your disposal (thanks for your tests!)

Cesare

2009/11/4 Mart Sõmermaa <mrts.pydev [at] gmail>

> On Tue, May 12, 2009 at 8:54 AM, Cesare Di Mauro
> <cesare.dimauro [at] a-tono> wrote:
> >> Also, I checked out wpython at head to run Unladen Swallow's
> >> benchmarks against it, but it refuses to compile with either gcc 4.0.1
> >> or 4.3.1 on Linux (fails in Python/ast.c). I can send you the build
> >> failures off-list, if you're interested.
> >>
> >> Thanks,
> >> Collin Winter
> >
> > I'm very interested, thanks. That's because I worked only on Windows
> > machines, so I definitely need to test and fix it to let it run on any
> other
> > platform.
> >
> > Cesare
>
> Re-animating an old discussion -- Cesare, any news on the wpython front?
>
> I did a checkout from http://wpython.googlecode.com/svn/trunk and
> was able to ./configure and make successfully on my 64-bit Linux box
> as well as to run the Unladen benchmarks.
>
> Given svn co http://svn.python.org/projects/python/tags/r261 in py261
> and svn co http://wpython.googlecode.com/svn/trunk in wpy,
>
> $ python unladen-tests/perf.py -rm --benchmarks=-2to3,all py261/python
> wpy/python
>
> gives the following results:
>
> Report on Linux foo 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16
> 14:05:01 UTC 2009 x86_64
> Total CPU cores: 2
>
> ai:
> Min: 0.640516 -> 0.586532: 9.20% faster
> Avg: 0.677346 -> 0.632785: 7.04% faster
> Significant (t=4.336740, a=0.95)
> Stddev: 0.05839 -> 0.08455: 30.94% larger
>
> Mem max: 7412.000 -> 6768.000: 9.52% smaller
> Usage over time: http://tinyurl.com/ykwhmcc
>
>
> call_simple:
> Min: 1.880816 -> 1.701622: 10.53% faster
> Avg: 1.944320 -> 1.778701: 9.31% faster
> Significant (t=14.323045, a=0.95)
> Stddev: 0.09885 -> 0.06000: 64.74% smaller
>
> Mem max: 8100.000 -> 6636.000: 22.06% smaller
> Usage over time: http://tinyurl.com/yzsswgp
>
>
> django:
> Min: 1.287158 -> 1.315700: 2.17% slower
> Avg: 1.330423 -> 1.366978: 2.67% slower
> Significant (t=-4.475769, a=0.95)
> Stddev: 0.05663 -> 0.05885: 3.78% larger
>
> Mem max: 15508.000 -> 16228.000: 4.44% larger
> Usage over time: http://tinyurl.com/yfpbmjn
>
>
> iterative_count:
> Min: 0.211620 -> 0.124646: 69.78% faster
> Avg: 0.222778 -> 0.159868: 39.35% faster
> Significant (t=9.291635, a=0.95)
> Stddev: 0.04239 -> 0.05279: 19.69% larger
>
> Mem max: 7388.000 -> 6680.000: 10.60% smaller
> Usage over time: http://tinyurl.com/yj7s8h4
>
>
> normal_startup:
> Min: 1.060017 -> 0.991366: 6.92% faster
> Avg: 1.189612 -> 1.170067: 1.67% faster
> Significant (t=2.002086, a=0.95)
> Stddev: 0.06942 -> 0.06864: 1.13% smaller
>
> Mem max: 3252.000 -> 4648.000: 30.03% larger
> Usage over time: http://tinyurl.com/ygo3bwt
>
>
> pickle:
> Min: 2.027566 -> 1.948784: 4.04% faster
> Avg: 2.051633 -> 2.043656: 0.39% faster
> Not significant
> Stddev: 0.03095 -> 0.07348: 57.88% larger
>
> Mem max: 8544.000 -> 7340.000: 16.40% smaller
> Usage over time: http://tinyurl.com/ykg9dn2
>
>
> pickle_dict:
> Min: 1.658693 -> 1.656844: 0.11% faster
> Avg: 1.689483 -> 1.698176: 0.51% slower
> Not significant
> Stddev: 0.16945 -> 0.09403: 80.20% smaller
>
> Mem max: 6716.000 -> 7636.000: 12.05% larger
> Usage over time: http://tinyurl.com/yjhyame
>
>
> pickle_list:
> Min: 0.919083 -> 0.894758: 2.72% faster
> Avg: 0.956513 -> 0.921314: 3.82% faster
> Significant (t=2.131237, a=0.95)
> Stddev: 0.12744 -> 0.10506: 21.31% smaller
>
> Mem max: 6804.000 -> 8792.000: 22.61% larger
> Usage over time: http://tinyurl.com/ylc3ezf
>
>
> pybench:
> Min: 58781 -> 50836: 15.63% faster
> Avg: 60009 -> 51788: 15.87% faster
>
> regex_compile:
> Min: 0.934131 -> 0.862323: 8.33% faster
> Avg: 0.962159 -> 0.884848: 8.74% faster
> Significant (t=13.587168, a=0.95)
> Stddev: 0.04685 -> 0.03229: 45.11% smaller
>
> Mem max: 12584.000 -> 12740.000: 1.22% larger
> Usage over time: http://tinyurl.com/yjngu8j
>
>
> regex_effbot:
> Min: 0.130686 -> 0.122483: 6.70% faster
> Avg: 0.143453 -> 0.138078: 3.89% faster
> Not significant
> Stddev: 0.01864 -> 0.03177: 41.32% larger
>
> Mem max: 7652.000 -> 6660.000: 14.89% smaller
> Usage over time: http://tinyurl.com/ykcgntf
>
>
> regex_v8:
> Min: 0.135130 -> 0.150092: 9.97% slower
> Avg: 0.138027 -> 0.177309: 22.15% slower
> Significant (t=-8.197595, a=0.95)
> Stddev: 0.00258 -> 0.04785: 94.60% larger
>
> Mem max: 11124.000 -> 12236.000: 9.09% larger
> Usage over time: http://tinyurl.com/ykb5vzu
>
>
> rietveld:
> Min: 0.848245 -> 0.816473: 3.89% faster
> Avg: 1.033925 -> 1.019889: 1.38% faster
> Not significant
> Stddev: 0.11242 -> 0.13006: 13.56% larger
>
> Mem max: 23792.000 -> 24548.000: 3.08% larger
> Usage over time: http://tinyurl.com/yhdvz5v
>
>
> slowpickle:
> Min: 0.876736 -> 0.800203: 9.56% faster
> Avg: 0.932808 -> 0.870577: 7.15% faster
> Significant (t=5.020426, a=0.95)
> Stddev: 0.05600 -> 0.11059: 49.36% larger
>
> Mem max: 7200.000 -> 7276.000: 1.04% larger
> Usage over time: http://tinyurl.com/ykt2brq
>
>
> slowspitfire:
> Min: 1.029100 -> 0.948458: 8.50% faster
> Avg: 1.062486 -> 1.020777: 4.09% faster
> Significant (t=4.581669, a=0.95)
> Stddev: 0.05441 -> 0.07298: 25.44% larger
>
> Mem max: 139792.000 -> 129264.000: 8.14% smaller
> Usage over time: http://tinyurl.com/yh7vmlh
>
>
> slowunpickle:
> Min: 0.411744 -> 0.356784: 15.40% faster
> Avg: 0.444638 -> 0.393261: 13.06% faster
> Significant (t=7.009269, a=0.95)
> Stddev: 0.04147 -> 0.06044: 31.38% larger
>
> Mem max: 7132.000 -> 7848.000: 9.12% larger
> Usage over time: http://tinyurl.com/yfwvz3g
>
>
> startup_nosite:
> Min: 0.664456 -> 0.598770: 10.97% faster
> Avg: 0.933034 -> 0.761228: 22.57% faster
> Significant (t=20.660776, a=0.95)
> Stddev: 0.09645 -> 0.06728: 43.37% smaller
>
> Mem max: 1940.000 -> 1940.000: -0.00% smaller
> Usage over time: http://tinyurl.com/yzzxcmd
>
>
> threaded_count:
> Min: 0.220059 -> 0.138708: 58.65% faster
> Avg: 0.232347 -> 0.156120: 48.83% faster
> Significant (t=23.804797, a=0.95)
> Stddev: 0.01889 -> 0.02586: 26.96% larger
>
> Mem max: 6460.000 -> 7664.000: 15.71% larger
> Usage over time: http://tinyurl.com/yzm3awu
>
>
> unpack_sequence:
> Min: 0.000129 -> 0.000120: 7.57% faster
> Avg: 0.000218 -> 0.000194: 12.14% faster
> Significant (t=3.946194, a=0.95)
> Stddev: 0.00139 -> 0.00128: 8.13% smaller
>
> Mem max: 18948.000 -> 19056.000: 0.57% larger
> Usage over time: http://tinyurl.com/yf8es3f
>
>
> unpickle:
> Min: 1.191468 -> 1.206198: 1.22% slower
> Avg: 1.248471 -> 1.281957: 2.61% slower
> Significant (t=-2.658526, a=0.95)
> Stddev: 0.05513 -> 0.11325: 51.32% larger
>
> Mem max: 7776.000 -> 8676.000: 10.37% larger
> Usage over time: http://tinyurl.com/yz96gw2
>
>
> unpickle_list:
> Min: 0.922200 -> 0.861167: 7.09% faster
> Avg: 0.955964 -> 0.976829: 2.14% slower
> Not significant
> Stddev: 0.04374 -> 0.21061: 79.23% larger
>
> Mem max: 6820.000 -> 8324.000: 18.07% larger
> Usage over time: http://tinyurl.com/yjbraxg
>
> ---
>
> The diff between the two trees is at
> http://dpaste.org/RpIv/
>
> Best,
> Mart Sõmermaa
> _______________________________________________
> Python-Dev mailing list
> Python-Dev [at] python
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/cesare.di.mauro%40gmail.com
>


collinw at gmail

Nov 4, 2009, 7:54 AM

Post #12 of 13 (259 views)
Permalink
Re: A wordcode-based Python [In reply to]

On Wed, Nov 4, 2009 at 4:20 AM, Mart Sõmermaa <mrts.pydev [at] gmail> wrote:
> On Tue, May 12, 2009 at 8:54 AM, Cesare Di Mauro
> <cesare.dimauro [at] a-tono> wrote:
>>> Also, I checked out wpython at head to run Unladen Swallow's
>>> benchmarks against it, but it refuses to compile with either gcc 4.0.1
>>> or 4.3.1 on Linux (fails in Python/ast.c). I can send you the build
>>> failures off-list, if you're interested.
>>>
>>> Thanks,
>>> Collin Winter
>>
>> I'm very interested, thanks. That's because I worked only on Windows
>> machines, so I definitely need to test and fix it to let it run on any other
>> platform.
>>
>> Cesare
>
> Re-animating an old discussion -- Cesare, any news on the wpython front?
>
> I did a checkout from http://wpython.googlecode.com/svn/trunk and
> was able to ./configure and make successfully on my 64-bit Linux box
> as well as to run the Unladen benchmarks.
>
> Given svn co http://svn.python.org/projects/python/tags/r261 in py261
> and svn co http://wpython.googlecode.com/svn/trunk in wpy,
>
> $ python unladen-tests/perf.py -rm --benchmarks=-2to3,all py261/python
> wpy/python

Do note that the --track_memory option to perf.py imposes some
overhead that interferes with the performance figures. I'd recommend
running the benchmarks again without --track_memory. That extra
overhead is almost certainly what's causing some of the variability in
the results.

Collin Winter
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


mrts.pydev at gmail

Nov 4, 2009, 9:32 AM

Post #13 of 13 (255 views)
Permalink
Re: A wordcode-based Python [In reply to]

On Wed, Nov 4, 2009 at 5:54 PM, Collin Winter <collinw [at] gmail> wrote:
> Do note that the --track_memory option to perf.py imposes some
> overhead that interferes with the performance figures.

Thanks for the notice, without -m/--track_memory the deviation in
results is indeed much smaller.

> I'd recommend
> running the benchmarks again without --track_memory.

Done:

$ python unladen-tests/perf.py -r --benchmarks=-2to3,all py261/python wpy/python

Report on Linux zeus 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16
14:05:01 UTC 2009 x86_64
Total CPU cores: 2

ai:
Min: 0.629343 -> 0.576259: 9.21% faster
Avg: 0.634689 -> 0.581551: 9.14% faster
Significant (t=39.404870, a=0.95)
Stddev: 0.01259 -> 0.00484: 160.04% smaller


call_simple:
Min: 1.796710 -> 1.700046: 5.69% faster
Avg: 1.801533 -> 1.716367: 4.96% faster
Significant (t=137.452069, a=0.95)
Stddev: 0.00522 -> 0.00333: 56.64% smaller


django:
Min: 1.280840 -> 1.275350: 0.43% faster
Avg: 1.287179 -> 1.287233: 0.00% slower
Not significant
Stddev: 0.01055 -> 0.00581: 81.60% smaller


iterative_count:
Min: 0.211744 -> 0.123271: 71.77% faster
Avg: 0.213148 -> 0.128596: 65.75% faster
Significant (t=88.510311, a=0.95)
Stddev: 0.00233 -> 0.00926: 74.80% larger


normal_startup:
Min: 0.520829 -> 0.516412: 0.86% faster
Avg: 0.559170 -> 0.554678: 0.81% faster
Not significant
Stddev: 0.02031 -> 0.02093: 2.98% larger


pickle:
Min: 1.988127 -> 1.926643: 3.19% faster
Avg: 2.000676 -> 1.936185: 3.33% faster
Significant (t=36.712505, a=0.95)
Stddev: 0.01650 -> 0.00603: 173.67% smaller


pickle_dict:
Min: 1.681116 -> 1.619192: 3.82% faster
Avg: 1.701952 -> 1.629548: 4.44% faster
Significant (t=34.513963, a=0.95)
Stddev: 0.01721 -> 0.01200: 43.46% smaller


pickle_list:
Min: 0.918128 -> 0.884967: 3.75% faster
Avg: 0.925534 -> 0.891200: 3.85% faster
Significant (t=60.451407, a=0.95)
Stddev: 0.00496 -> 0.00276: 80.00% smaller


pybench:
Min: 58692 -> 51128: 14.79% faster
Avg: 59914 -> 52316: 14.52% faster

regex_compile:
Min: 0.894190 -> 0.816447: 9.52% faster
Avg: 0.900353 -> 0.826003: 9.00% faster
Significant (t=24.974080, a=0.95)
Stddev: 0.00448 -> 0.02943: 84.78% larger


regex_effbot:
Min: 0.124442 -> 0.123750: 0.56% faster
Avg: 0.134908 -> 0.126137: 6.95% faster
Significant (t=5.496357, a=0.95)
Stddev: 0.01581 -> 0.00218: 625.68% smaller


regex_v8:
Min: 0.132730 -> 0.143494: 7.50% slower
Avg: 0.134287 -> 0.147387: 8.89% slower
Significant (t=-40.654627, a=0.95)
Stddev: 0.00108 -> 0.00304: 64.34% larger


rietveld:
Min: 0.754050 -> 0.737335: 2.27% faster
Avg: 0.770227 -> 0.754642: 2.07% faster
Significant (t=7.547765, a=0.95)
Stddev: 0.01434 -> 0.01486: 3.49% larger


slowpickle:
Min: 0.858494 -> 0.795162: 7.96% faster
Avg: 0.862350 -> 0.799479: 7.86% faster
Significant (t=133.690989, a=0.95)
Stddev: 0.00394 -> 0.00257: 52.92% smaller


slowspitfire:
Min: 0.955587 -> 0.909843: 5.03% faster
Avg: 0.965960 -> 0.925845: 4.33% faster
Significant (t=16.351067, a=0.95)
Stddev: 0.01237 -> 0.02119: 41.63% larger


slowunpickle:
Min: 0.409312 -> 0.346982: 17.96% faster
Avg: 0.412381 -> 0.349148: 18.11% faster
Significant (t=242.889869, a=0.95)
Stddev: 0.00198 -> 0.00169: 17.61% smaller


startup_nosite:
Min: 0.195620 -> 0.194328: 0.66% faster
Avg: 0.230811 -> 0.238523: 3.23% slower
Significant (t=-3.869944, a=0.95)
Stddev: 0.01932 -> 0.02052: 5.87% larger


threaded_count:
Min: 0.222133 -> 0.133764: 66.06% faster
Avg: 0.236670 -> 0.147750: 60.18% faster
Significant (t=57.472693, a=0.95)
Stddev: 0.01317 -> 0.00813: 61.98% smaller


unpack_sequence:
Min: 0.000129 -> 0.000119: 8.43% faster
Avg: 0.000132 -> 0.000123: 7.22% faster
Significant (t=24.614061, a=0.95)
Stddev: 0.00003 -> 0.00011: 77.02% larger


unpickle:
Min: 1.191255 -> 1.149132: 3.67% faster
Avg: 1.218023 -> 1.162351: 4.79% faster
Significant (t=21.222711, a=0.95)
Stddev: 0.02242 -> 0.01362: 64.54% smaller


unpickle_list:
Min: 0.880991 -> 0.965611: 8.76% slower
Avg: 0.898949 -> 0.985231: 8.76% slower
Significant (t=-17.387537, a=0.95)
Stddev: 0.04838 -> 0.01103: 338.79% smaller
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com

Python dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.