Thread overview
[D-runtime] thread_needLock() and related code
Jun 24, 2012
Sean Kelly
Jun 25, 2012
Martin Nowak
June 23, 2012
Hi,

I've noticed that there's quite a bit of complexity in core.thread due to the singlethreaded optimizations (thread_needLock() and related code). Is there really enough of a performance gain to justify having this functionality there in this day and age?

Regards,
Alex
_______________________________________________
D-runtime mailing list
D-runtime@puremagic.com
http://lists.puremagic.com/mailman/listinfo/d-runtime

June 24, 2012
Nope. I think the function is effectively ignored these days anyway.

On Jun 23, 2012, at 11:23 AM, Alex Rønne Petersen <xtzgzorex@gmail.com> wrote:

> Hi,
> 
> I've noticed that there's quite a bit of complexity in core.thread due to the singlethreaded optimizations (thread_needLock() and related code). Is there really enough of a performance gain to justify having this functionality there in this day and age?
> 
> Regards,
> Alex
> _______________________________________________
> D-runtime mailing list
> D-runtime@puremagic.com
> http://lists.puremagic.com/mailman/listinfo/d-runtime
_______________________________________________
D-runtime mailing list
D-runtime@puremagic.com
http://lists.puremagic.com/mailman/listinfo/d-runtime

June 25, 2012
On Sun, 24 Jun 2012 18:53:23 +0200, Sean Kelly <sean@invisibleduck.org> wrote:

> Nope. I think the function is effectively ignored these days anyway.
>
I recently tried to measure performance differences w.r.t. always locking in the GC and didn't found any.
Spinlocking an uncontended lock is fairly cheap but I've not tested this on Windows.
_______________________________________________
D-runtime mailing list
D-runtime@puremagic.com
http://lists.puremagic.com/mailman/listinfo/d-runtime