[Python-Dev] Re: marking shared-ness
Fri, 21 Apr 2000 14:38:27 +0200
Greg Stein wrote:
> On Thu, 20 Apr 2000, Christian Tismer wrote:
[me, about free threading with less sharing]
> No. Now you're just talking processes with IPC. Yes, they happen to run in
> threads, but you got none of the advantages of a threaded application.
Are you shure that every thread user shares your opinion?
I see many people using threads just in order to have
multiple tasks in parallel, with none or quite few shared
> Threading is about sharing an address space.
This is part of the truth. There are a number of other
reasons to use threads, too.
Since Python has nothing really private, this implies in
fact to protect every single object for free threading,
although nobody wants this in the first place to happen.
Other languages have much fewer problems here (I mean
C, C++, Delphi...), they are able to do the right thing
in the right place.
Python is not designed for that. Why do you want to enforce
the impossible, letting every object pay a high penalty
to become completely thread-safe?
Sharing an address space should not mean to share
everything, but something. If Python does not support
this, we should think of a redesign of its threading
model, instead of loosing so much of efficiency.
You end up in a situation where all your C extensions
can run free threaded at high speed, just Python is
busy all the time to fight the threading.
That is not Python.
You know that I like to optimize things. For me, optimization
mut give an overall gain, not just in one area, where others
get worse. If free threading cannot be optimized in
a way that gives better overall performance, then
it is a wrong optimization to me.
Well, this is all speculative until we did some measures.
Maybe I'm just complaining about 1-2 percent of performance
loss, then I'd agree to move my complaining into /dev/null :-)
ciao - chris
Christian Tismer :^) <mailto:firstname.lastname@example.org>
Applied Biometrics GmbH : Have a break! Take a ride on Python's
Kaunstr. 26 : *Starship* http://starship.python.net
14163 Berlin : PGP key -> http://wwwkeys.pgp.net
PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF
where do you want to jump today? http://www.stackless.com