Writing fast C# inside Space Engineers mod scripts means working with tight constraints: one game thread shared with the whole game world, a frame budget of milliseconds per tick, and a compiler that adds invisible overhead to every method you write.
The SE compiler is old. Here are some things to avoid and what to use instead: