# science


01/15/2019, 5:09 PM
We just had a short discussion with @Vsevolod Tolstopyatov [JB] about coroutines new scheduler and its possible applications for heavy load scientific computations. My experiments with coroutines for lazy nd-structure transformations shows that making simple numeric operations with them won't work, the overhead for switching contexts is too large, but there is one application my group was working on for some time: Monte-Carlo simulation in particle physics. Simulation looks like follows: particle interacts (not very expensive but also not trivial computation). Upon interaction it could die or produce one or several particles that propagates further. Now we want to move computations to other threads to utilize multiple cores or even cluster. I can't create a thread for each computation, it is too expensive. Current engines use different types of really ugly and ineffective queuing. The idea is to use coroutines and channels for that. We have a prototype engine, but it requires further testing.


01/19/2019, 10:09 PM
nice. Would there be a way to make the channels networked?


01/20/2019, 5:41 AM
Ultimately, yes. We are also working on serializing scientific task and remote calls. But it requires a lot of work.