wasm-demo/demo/ermis-f/python_m/cur/1237

50 lines
2.1 KiB
Plaintext

From: markus_kohler at hp.com (Markus Kohler)
Date: 29 Apr 1999 10:13:46 +0200
Subject: Python IS slow ! [was] Re: Python too slow for real world
References: <613145F79272D211914B0020AFF6401914DAD8@gandalf.digicool.com> <p5g15lmb35.fsf@bidra241.bbn.hp.com> <37272CA0.3F3F02A2@prescod.net>
Message-ID: <p5aevrn8sl.fsf@bidra241.bbn.hp.com>
Content-Length: 1707
X-UID: 1237
>>>>> "Paul" == Paul Prescod <paul at prescod.net> writes:
Paul> Markus Kohler wrote:
>>
>>
>> You are right that one should choose the right tool for a
>> problem, but I disagree that Python is optimized for the
>> general case. Squeak a free Smalltalk implementation
>> (www.squeak.org), is already much faster ( about 3 times
>> actually ) than python and it has even a true Garbage
>> Collector.
Paul> This is a little off-topic but I'm curious whether squeak
Paul> has an embedding API. Is there any languge that is as easy
Paul> to embed as Python, and also has full garbage collection?
No really off-topic, because not using a GC makes embedding much easier, because
objects do not move around. Squeak has 'plugins' but these are not yet good
enough to allow embedding of arbitrary C code. The main problem is of course
that some C code cannot use Squeak allocated objects because the address of the object
may change because of garbage collection. Also Squeak currently lacks an easy general
mechanism to callback Squeak code from C.
In summary one can say that with a decent GC (generational copying + mark and sweep)
embedding is more diffcult. Anyway I think a fairly simple embedding API with could
be done, it's just more work to do once.
Visualworks a commercial Smalltalk implementation shows it's possible to do it.
They also have a COM integration for example.
I don't know of any other language with a decent garbage that is easy to embed.
Maybe SmallEiffel does it. I is a free Eiffel compiler that translates to C has an (optional) GC
and allows to call C code.
Markus
--
Markus Kohler mailto:markus_kohler at hp.com