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

osa osa at aso.osa
Fri Oct 8 14:46:26 PDT 2010


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 Variant, which is something that would have been
> necessary for inter-process messaging anyway.  Here are the timings:
>
> --- After ---
>
> $ dmd -inline -release -O priority
> Benchmark: 7204200 iterations in 5 seconds (1.44084e+06/second)
> Benchmark: 7167000 iterations in 5 seconds (1.4334e+06/second)
> Benchmark: 7164400 iterations in 5 seconds (1.43288e+06/second)
>
> $ dmd -inline -release -O priority -version=priority
> Benchmark: 7442500 iterations in 5 seconds (1.4885e+06/second)
> Benchmark: 7448600 iterations in 5 seconds (1.48972e+06/second)
> Benchmark: 7421800 iterations in 5 seconds (1.48436e+06/second)

Wow! This is a really good improvement. Thanks! I assume this is in 
phobos SVN already, so I'll try to build my application (not simplified 
benchmark) using updated std.concurrency to see how it performs now. 
I'll let you know if something is wrong ;)


More information about the Digitalmars-d mailing list