| ▲ | ptrwis 8 hours ago | |
I'm currently writing simulations of trading algorithms for my own use. I'm using worker_threads + SharedArrayBuffer and running them in Bun. I also tried porting the code to C# and Go, but the execution time ended up being very similar to the Bun version. NodeJS was slower. Only C gave a clear, noticeable performance advantage — but since I haven't written C in a long time, the code became significantly harder to maintain. | ||
| ▲ | shepardrtc 2 hours ago | parent [-] | |
I built an algorithmic trader years ago just using Python, but for the hot paths I gave each algorithm its own function in its own file, and then I would compile the files with Cython. The speedup was pretty significant. I barely wrote any "Cython" stuff (meaning declaring variables and other minor assists). The code is still very much python, just with a few little extras that are easy to understand. | ||