3 ms·
It's done differently in Go because someone else wrote it, and I found it to be faster than the version I wrote using a worker pool of 4 tasks. If you look clos
by logicchains 13y ago
It's done differently in Go because someone else wrote it, and I found it to be faster than the version I wrote using a worker pool of 4 tasks. If you look closely you'll see it doesn't actually ever run more than 4 goroutines simultaneously.
- james4k 13y agoI noticed that, but you're still allocating for 800 goroutines in the end. I guess in the scope of the benchmark, that is still relatively cheap. It just was a red flag for me.
- logicchains 13y agoNo worries. A commenter here submitted a faster version, so it uses that now instead anyway.
- kid0m4n 13y agoThanks :P And now an even faster version for your perusal: https://github.com/logicchains/Levgen-Parallel-Benchmarks/pull/11 https://github.com/logicchains/Levgen-Parallel-Benchmarks/pu... > 120 ms improvement over the origin implementation
- kid0m4n 13y agoThe original was running upto 8 goroutines (my runtime.NumCPU() is 8.)