Re: [std.concurrency] prioritySend is 1000 times slower than send?

2010-10-08 Thread osa
On 10/08/2010 04:29 PM, Sean Kelly wrote: I just made some functional changes to how priority messages are sent and added a few performance tweaks to messaging in general. The only visible difference should be that PriorityMessageException is no longer a template class but instead contains a V

Re: [std.concurrency] prioritySend is 1000 times slower than send?

2010-10-08 Thread Sean Kelly
== Quote from Sean Kelly (s...@invisibleduck.org)'s article > Sean Kelly Wrote: > > osa Wrote: > > > > > I started using std.concurrency in some projects and overall it feels > > > like a solid (albeit minimalistic) design. However, current > > > implementation has some issues. For example, I've no

Re: [std.concurrency] prioritySend is 1000 times slower than send?

2010-09-30 Thread Sean Kelly
osa Wrote: > On 09/30/2010 03:33 PM, Sean Kelly wrote: > > osa Wrote: > >> > >> I've also thought about switching to 'send' if the receiver queue is > >> empty, but there is no way in std.concurrency API to check for that. Is > >> there any serious issue with adding such method? I understand that

Re: [std.concurrency] prioritySend is 1000 times slower than send?

2010-09-30 Thread osa
On 09/30/2010 03:33 PM, Sean Kelly wrote: osa Wrote: I've also thought about switching to 'send' if the receiver queue is empty, but there is no way in std.concurrency API to check for that. Is there any serious issue with adding such method? I understand that in multi-threaded environment an e

Re: [std.concurrency] prioritySend is 1000 times slower than send?

2010-09-30 Thread Sean Kelly
osa Wrote: > > I've also thought about switching to 'send' if the receiver queue is > empty, but there is no way in std.concurrency API to check for that. Is > there any serious issue with adding such method? I understand that in > multi-threaded environment an empty queue as told by 'isEmpty'

Re: [std.concurrency] prioritySend is 1000 times slower than send?

2010-09-30 Thread osa
On 09/30/2010 01:45 PM, Sean Kelly wrote: Benchmark: 5944400 iterations in 5 seconds (1.1e+06/second) -- built without -version=priority Benchmark: 4900 iterations in 5.119 seconds (957.218/second) -- build with -version=priority before fix Benchmark: 39700 iterations in 5.001 seconds (7938

Re: [std.concurrency] prioritySend is 1000 times slower than send?

2010-09-30 Thread Sean Kelly
Sean Kelly Wrote: > osa Wrote: > > > I started using std.concurrency in some projects and overall it feels > > like a solid (albeit minimalistic) design. However, current > > implementation has some issues. For example, I've noticed that using > > prioritySend slows everything considerably. >

Re: [std.concurrency] prioritySend is 1000 times slower than send?

2010-09-30 Thread Sean Kelly
osa Wrote: > I started using std.concurrency in some projects and overall it feels > like a solid (albeit minimalistic) design. However, current > implementation has some issues. For example, I've noticed that using > prioritySend slows everything considerably. Thanks for this. I can tell you

Re: [std.concurrency] prioritySend is 1000 times slower than send?

2010-09-29 Thread Denis Koroskin
On Wed, 29 Sep 2010 22:31:53 +0400, Steven Schveighoffer wrote: On Wed, 29 Sep 2010 14:25:07 -0400, osa wrote: P.S. demangle program example at http://www.digitalmars.com/d/2.0/phobos/std_demangle.html is broken -- it does not compile. P.P.S. std.demangle fails for some symbols, for e

Re: [std.concurrency] prioritySend is 1000 times slower than send?

2010-09-29 Thread Steven Schveighoffer
On Wed, 29 Sep 2010 14:25:07 -0400, osa wrote: P.S. demangle program example at http://www.digitalmars.com/d/2.0/phobos/std_demangle.html is broken -- it does not compile. P.P.S. std.demangle fails for some symbols, for example: _D3std5array13__T5emptyTyaZ5emptyFNdxAyaZb _

[std.concurrency] prioritySend is 1000 times slower than send?

2010-09-29 Thread osa
I started using std.concurrency in some projects and overall it feels like a solid (albeit minimalistic) design. However, current implementation has some issues. For example, I've noticed that using prioritySend slows everything considerably. Here is a simple benchmark to demonstrate the proble