[Stackless] Slowdown when running Numpy with Stackless?

Richard Tew richard.m.tew at gmail.com
Sun May 5 22:16:31 CEST 2013

On Sun, May 5, 2013 at 2:57 PM, Bin Huang <bin.arthur at gmail.com> wrote:
> I have observed slowdown when running Numpy with Stackless compared to
> running it with CPython. The slowdown can be significant when problem size
> is large. I wish someone in this mailing list can give me some hints on this
> issue. I also post performance results and my source code here.
> My platform is a 12-core dual-socket SMP machine running Ubuntu (Linux
> kernel 3.2.0). On this platform, I have CPython 2.7.3, Numpy 1.6.1, and
> Stackless Python 2.7.2 installed.
> ...
> Any ideas? Thanks in advance.

As it stands, you have tested with different versions of Python and
Stackless, and both should be using different lib directories.  There
are too many variables, where the problem may lie with your
installations.  Or perhaps whatever packages you sourced them from.

This can be easily tested.  If you compile Stackless Python with
STACKLESS_OFF defined, it should compile as normal Python of the same
version (e.g. 2.7.2 or 2.7.3).

So do the following:
1) Obtain the source code for Stackless Python 2.7.2 tarball release,
compile it, install numpy local to it and execute your test.
2) Then take the same source code in a different directory, compile it
with STACKLESS_OFF defined (which should compile to just normal Python
of the same version), install numpy local to it and execute your test.

And if you really want to be certain that things line up:
3) Obtain the source code for official Python 2.7.2 tarball release.
Repeat the test process.

All should be the same.  If Stackless differs as shown in your tests,
then the problem undeniably lies with Stackless.

Hope this helps,

More information about the Stackless mailing list