|
![](/i/fill.gif) |
>>>> Safe languages don't permit race conditions in the first place.
>>> And then you wonder why safe languages are so slow.
>
>> I wonder why everybody _assumes_ they're going to be slow, yes.
>
> Well, if every access to a shared variable is thread-safe, it is going
> to be slower than non-locked access.
Locks aren't the only way to implement safe shared variables.
Something like STM with optimistic locking can impose a very small
overhead. Smaller than locking.
Personally, I'd accept a 1% speed hit if it means I don't have to spend
decades hunting down weird bugs than vanish when you try to debug them.
But that's just me...
Post a reply to this message
|
![](/i/fill.gif) |