473,396 Members | 1,971 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Re: Native Code vs. Python code for modules

koblas wrote:
Ruby has been getting pummeled for the last year or more on the
performance subject. They've been working hard at improving it. From
my arm chair perspective Python is sitting on it's laurels and not
taking this as seriously as it probably should.
PyPy was supposed to help, but that project has been dragging on
for half a decade now. Personally, I think the Shed Skin approach
is more promising. PyPy has too many different goals, and tends
to generate lots of auxiliary tools, blogs, videos, and "sprints",
but not a usable PyPy compiler.

We'll have to see if PyPy 1.1 works.

John Nagle
Jul 30 '08 #1
2 1885
John Nagle:
Personally, I think the Shed Skin approach
is more promising.
ShedSkin will probably have scaling problems: as the program size
grows it may need too much time to infer all the types. The author has
the strict policy of refusing any kind of type annotation, this make
it unpractical.

And, despite your interest in ShedSkin, so far very few people have
given a hand actually developing SS (I think partially because
ShedSkin Python sources aren't much hackable. This is very bad for an
OpenSource project), so I think the author now has lost part of the
will to develop this project (but probably we'll see one of two more
versions).

For me so far the most viable way to produce a faster Python system
seems a version of CPython with Cython and something Psyco-like built-
in (and a built-in compiler on Windows, like MinGW 4.2.1), maybe with
some syntax support in the Python language, allowing to mix statically
compiled Python code with dynamically compiled Python code in an easy
way (as CLisp sometimes does).

Bye,
bearophile
Jul 30 '08 #2
ShedSkinwill probably have scaling problems: as the program size
grows it may need too much time to infer all the types. The author has
the strict policy of refusing any kind of type annotation, this make
it unpractical.
well, I admit I really don't like manual type annotations (unless for
documentation purposes). it seems a much nicer (..pythonic) approach
to just get type information from a profiler. if I had four hands (and
two brains), shedskin would probably already include one.

that said, I know of several ways to improve the scalability
shedskin's type analysis itself, and I might still pursue those. but I
think, in combination with a profiler, things should scale pretty well
already.. certainly enough to compile most smallish programs/extension
modules of up to a few thousands lines.
And, despite your interest inShedSkin, so far very few people have
given a hand actually developing SS (I think partially
well, it's been quite a few people actually, about 15 that have
contributed substantial improvements. of course doing a compiler like
this is probably more than 10 person-years of work, so I could always
use more help.

becauseShedSkinPython sources aren't much hackable. This is very bad
for an
OpenSource project), so I think the author now has lost part of the
I think they are reasonably hackable for the most part, and this can
only improve. in the beginning I had little documentation, and there
was just this 7000-line Python file :-) now things are more split up,
and I even added documentation recently to each part. yes, type
inference will always be hard to hack on, but that's only one part.
the C++ side, where I can arguably use most help, and which consists
of more than half of the code, has always been easily hackable.
will to develop this project (but probably we'll see one of two more
versions).
I have my ups and downs of course, but at the moment I'm quite
enthousiastic about the whole thing, in part because people are
actually contributing. a new release is coming up, with support for
datetime and ConfigParser among many other improvements/fixes, and
there is a much faster set implementation in the pipeline. at the
moment, I have no plans to halt development at all.
For me so far the most viable way to produce a faster Python system
seems a version of CPython with Cython and something Psyco-like built-
in (and a built-in compiler on Windows, like MinGW 4.2.1), maybe with
some syntax support in the Python language, allowing to mix statically
compiled Python code with dynamically compiled Python code in an easy
way (as CLisp sometimes does).
shedskin can of course generate extension modules (shedskin -e), that
can be imported from larger Python programs. it's a bit clumsy, as
only builtins can be passed to/from shedskin, and everything (args,
return values) is copied recursively, but it can be quite useful
already. and of course it can only improve as well..
mark.
Aug 31 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Berthold Hoellmann | last post by:
Hello, When I use ./configure --with-thread --with-fpectl --with-signal-module \ --with-pymalloc --enable-shared --with-cxx=g++ make test on 2.3.3 I get
1
by: Jerald | last post by:
Running python 2.3.4 on valgrind (a tool like purify which checks the use of uninitialized memory, etc), gives a lot of errors. See below. jfj@cluster:~/> python -V Python 2.3.4...
4
by: Edmond Rusjan | last post by:
Hi All, I'd like to use Python-2.3.4 on OSF1 V4.0, but have trouble installing. With a plain "./configure; make" build, I cannot import socket. If I uncomment the socketmodule in Modules/Setup,...
7
by: Erik Johnson | last post by:
I am trying to upgrade my Python installation. After downloading sources and building Python 2.3.4, I am unable to use the command history editing feature in the interactive interpreter (where the...
7
by: Edward Diener | last post by:
I can install Python 2.4 on the Fedora 3 Linux system, but after I do a number of Linux utilities and commands, like yum, stop working because they were dependent on the Python 2.3 installation....
7
by: Philippe C. Martin | last post by:
Hi, I am looking for the pros and cons as to how to integrate a Python module into a Windows native application. So far I have looked at 1) coding the C wrapper myself 2) using Pyrex 3)...
9
by: John Dean | last post by:
Hi Does anybody know from where I can get a copy of the source for Python V2.4.2. I downloaded what is reckoned to be the source code from www.python.org, but is turns out to be the MacXOS...
0
by: mg | last post by:
When make gets to the _ctypes section, I am getting the following in my output: building '_ctypes' extension creating build/temp.solaris-2.10-i86pc-2.5/home/ecuser/Python-2.5.1/ Modules/_ctypes...
2
by: alex23 | last post by:
On Jul 30, 1:56 pm, koblas <kob...@gmail.comwrote: Well, the snarky response is most Python developers are too busy working on actual real world projects :) A more measured response would be...
0
by: Akira Kitada | last post by:
Hi list, I was trying to build Python 2.6 on FreeBSD 4.11 and found it failed to build some of the modules. """ Failed to find the necessary bits to build these modules: _bsddb ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.