what's the point of rpython?
Rhodri James
rhodri at wildebst.demon.co.uk
Wed Jan 21 00:32:41 EST 2009
On Wed, 21 Jan 2009 02:29:01 -0000, Paul Rubin
<"http://phr.cx"@nospam.invalid> wrote:
> "Rhodri James" <rhodri at wildebst.demon.co.uk> writes:
>> > What cpu's do you know of that can atomically increment and decrement
>> > integers without locking?
>>
>> x86 (and pretty much any 8080 derivative, come to think of it).
>
> It would not have occurred to me that "lock inc" increments "without
> locking". I understand that's different from a lock value sitting in
> the data object but I thought that "lock-free algorithm" meant one
> that didn't assert any of these hardware locks either. Maybe I'm
> wrong.
I tend to live in single-core worlds, so "inc" on its lonesome works
just fine.
>> Just do the locking properly and worry about optimisations later.
>
> That has already been tried, and found to be unacceptably slow for the
> purpose at hand. Now we're looking for the optimizations.
In that case I'd second the suggestion of taking a long, hard look
at the Linux core locking and synchronisation primatives.
--
Rhodri James *-* Wildebeeste Herder to the Masses
More information about the Python-list
mailing list