Making Python Fast With Numba & Dask (Quick Example)

preview_player
Показать описание
Let's make Python go fast.

1. Start with a (fake) signals processing workload using numpy on my laptop that takes ~10 seconds
2. 20X the data but run it in 5 seconds by changing one line of code with numba
3. 10X the data while still running in ~10 seconds with a dask cluster using just a few lines of code
4. Go really big. Simulate a real-time sensor and run it a whole bunch of times just by asking Coiled for a 100 node Dask cluster

No too shabby, right? Faster. More data. And very little additional code (which would confuse me, because I'm just copying this stuff, not writing it myself). And my 100 node cluster costs only $6.50/hour

This is based on Matthew Rocklin's High Performance Python screencast. I'll be copying more of his stuff filtered through the lens of someone who struggles to computer.
Рекомендации по теме
Комментарии
Автор

Thanks, @Gus. What could be the better solution while coding algo trading script to go through list of stocks parallely > check conditions and call broker API to place trade? 1) Numba JIT parallalization 2) Dask 3) Combination of both
Could you please advise? Many thanks!

hackyourself
welcome to shbcf.ru