Oh, my GoD! Goroutines on D
mw
mingwu at gmail.com
Mon Jun 15 01:55:27 UTC 2020
On Sunday, 14 June 2020 at 22:57:25 UTC, Jin wrote:
> My wheels are quite simple:
> https://github.com/nin-jin/go.d/blob/master/source/jin/go/queue.d
>
...
> received 100000000 messages in 10011 msec sum=4999999950000000
> speed=9989 msg/msec
Since you are using 1-provider-1-consumer queue, can you try this
package as a drop-in replacement in go.d:
https://github.com/MartinNowak/lock-free/blob/master/src/lock_free/rwqueue.d
(you may need to add align() to that implementation).
according to my test:
received 1000000000 messages in 9845 msec sum=499999999500000000
speed=101574 msg/msec
you may get ~10x boost.
More information about the Digitalmars-d
mailing list