Oh, my GoD! Goroutines on D

Jin nin-jin at ya.ru
Mon May 25 16:26:31 UTC 2020


On Saturday, 16 May 2020 at 20:06:47 UTC, mw wrote:
> On Tuesday, 29 March 2016 at 17:10:02 UTC, Jin wrote:
>>
>> http://wiki.dlang.org/Go_to_D
>
> Any performance comparison with Go? esp. in real word scenario?
>
> Can it easily handle hundreds of (go)routines?

I have updated the code. But it isn't ready to use currently 
because:

1. I rewrote code to use std.parallelism instead of vibe.d. So, 
it's difficult to integrate fibers with tasks. Now, every tasks 
spinlocks on waiting channel and main thread don't useful work.

2. Race condition. I'm going to closely review algorithm.

Currently it's twice slower than Go. On y machine:

>go run app.go --release
Workers Result          Time
4       499500000       27.9226ms

>dub --quiet --build=release
Workers Result          Time
3       499500000       64 ms

It would be cool if someone help me with it. There are 
docstrings, tests and diagrams. I'll explain more if someone 
joins.


More information about the Digitalmars-d mailing list