Hacker News new | ask | show | jobs
by cjwoodall 1842 days ago
I would contend that 10kHz is pretty fast for a control loop thats doing anything complicated in a Garbage Collected language on a non real-time OS. The later issue being some what of a bigger issue than the GC. You CAN do it... some of the Basic linux real time stuff helps the situation a lot.

In .NET you can also change the GC policy at the thread level which can help a lot.

Pool Allocation (long held chunks of memory that can be manually repurposed) can help a lot, since you can write custom Pools where the Gc never knows it needs to clean up. It is a useful tool when you have big chunks of memory that need to be manipulated at a high rates.

I would say from experience that 500Hz-1kHz is a more reasonable loop time