Optimizing passing data between classes for processing in simulation, C#
I’m working on a simulation that will be running a certain operation upwards of hundreds of millions of times per frame, so performance in this loop is critical. I’m nearly at my performance target but I would like advice on if this is the best way, or there’s something I’m overlooking.
While Loop vs. Recursion Method Performance in C# [closed]
Closed 55 secs ago.
While Loop vs. Nested Method Performance in C#
In the code below, which method will be more performant as memory usage and CPU time? I tested performance, nested method is better for CPU time but couldn’t test memory usage (I don’t use nested methods like this, it will cause stack overflow exception, just wondering).
How do I efficiently set which code branch to use in a low-level C# function?
I’m writing a relatively straight-forward physics simulation, in which many small indicator points are initialized. The core of the code is in one project, with two different interface projects (i.e. two solutions) both using the same core.
Reaching performance of unsafe_any_cast using only standard library features
I am using std::any to store a value of any type. std::any is a type-safe container and one of its features is that attempting to reach for the wrong type throws std::bad_any_cast exception. In some cases I can be sure that the stored type is the one I am trying to get, but I still have to go through std::any_cast which checks the stored type info and possibly throws an exception.