On Thu, Feb 9, 2012 at 9:22 AM, dsimcha <span dir="ltr"><<a href="mailto:dsimcha@yahoo.com">dsimcha@yahoo.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I wonder how much it helps to just optimize the GC a little.  How much does the performance gap close when you use DMD 2.058 beta instead of 2.057?  This upcoming release has several new garbage collector optimizations.  If the GC is the bottleneck, then it's not surprising that anything that relies heavily on it is slow because D's GC is still fairly naive.<div class="im">
<br>
<br>
On Thursday, 9 February 2012 at 15:44:59 UTC, Sean Kelly wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
So a queue per message type?  How would ordering be preserved? Also, how would this work for interprocess messaging?  An array-based queue is an option however (though it would mean memmoves on receive), as are free-lists for nodes, etc.  I guess the easiest thing there would be a lock-free shared slist for the node free-list, though I couldn't weigh the chance of cache misses from using old memory blocks vs. just expecting the allocator to be fast.<br>

<br>
On Feb 9, 2012, at 6:10 AM, Gor Gyolchanyan <<a href="mailto:gor.f.gyolchanyan@gmail.com" target="_blank">gor.f.gyolchanyan@gmail.com</a>> wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Generally, D's message passing is implemented in quite easy-to-use<br>
way, but far from being fast.<br>
I dislike the Variant structure, because it adds a huge overhead. I'd<br>
rather have a templated message passing system with type-safe message<br>
queue, so no Variant is necessary.<br>
In specific cases Messages can be polymorphic objects. This will be<br>
way faster, then Variant.<br>
<br></div><div class="im">
On Thu, Feb 9, 2012 at 3:12 PM, Alex Dovhal <alex <a href="mailto:dovhal@yahoo.com" target="_blank">dovhal@yahoo.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sorry, my mistake. It's strange to have different 'n', but you measure speed<br>
as 1000*n/time, so it's doesn't matter if n is 10 times bigger.<br>
<br>
<br>
</blockquote>
<br>
<br>
<br>
--<br>
Bye,<br>
Gor Gyolchanyan.<br>
</div></blockquote></blockquote>
<br>
<br>
</blockquote></div><br><div>dmd 2.057:</div><div><div>received 100000000 messages in 192034 msec sum=4999999950000000 speed=520741 msg/sec</div></div><div><div>received 100000000 messages in 84118 msec sum=4999999950000000 speed=1188806 msg/sec</div>
</div><div><div>received 100000000 messages in 88274 msec sum=4999999950000000 speed=1132836 msg/sec</div></div><div><br></div><div>dmd 2.058 beta:</div><div><div>received 100000000 messages in 93539 msec sum=4999999950000000 speed=1069072 msg/sec</div>
</div><div><div>received 100000000 messages in 96422 msec sum=4999999950000000 speed=1037107 msg/sec</div></div><div><div>received 100000000 messages in 203961 msec sum=4999999950000000 speed=490289 msg/sec</div></div><div>
<br></div><div>Both versions would inexplicably run at approximately half the speed sometimes. I have no idea what is up with that.  I have no java development environment to test for comparison.  This machine has 4 cores and is running Windows.</div>
<div><br></div><div>Regards,</div><div>Brad Anderson</div>