Join Slack
Powered by
My coroutine approach for calculating prime number...
# coroutines
a
Andrew Gazelka
11/27/2018, 1:52 PM
My coroutine approach for calculating prime numbers is slower (by about 700ms... total = 6700ms) , even when grouping multiple prime calculations. Any idea why or how I can make this faster?
https://gist.github.com/andrewgazelka/977ade9862f7fd6fff686b6bdc1db70c
g
gildor
11/27/2018, 4:26 PM
You launching 1000 coroutines, so create 1000 objects (maybe more), probably gc overhead involved, and also you have thread context switch What is you baseline?
8
Views
Open in Slack
Previous
Next