POV-Ray : Newsgroups : povray.off-topic : This is great : Re: This is great Server Time
5 Sep 2024 17:13:49 EDT (-0400)
  Re: This is great  
From: Invisible
Date: 21 Aug 2009 11:30:40
Message: <4a8ebda0$1@news.povray.org>
>>>> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.