Performance issue with fiber

hanabi1224 harlowmoo at gmail.com
Wed Jul 28 21:01:26 UTC 2021


On Wednesday, 28 July 2021 at 14:39:29 UTC, Mathias LANG wrote:
> Hence doing:
> ```diff
> - auto scheduler = new FiberScheduler();
> + scheduler = new FiberScheduler();
> ```

Thanks for pointing it out! Looks like I was benchmarking thread 
instead of fiber. I just made the change you suggest but the 
result is very similar, that being said, using system thread or 
fiber does not make any obvious difference in this test case, 
this fact itself seems problematic, fiber should be much faster 
than system thread in this test case (as I have proved for many 
other langs with the same case, I published results 
[here](https://programming-language-benchmarks.vercel.app/problem/coro-prime-sieve) but note that not all of them are implemented with stackful coroutine), unless there's some defect in D's current fiber implementation.


More information about the Digitalmars-d-learn mailing list