1) In the demo TimeStep of BEPU = TimeStep of PhysX
To clarify, the time step duration is not the same thing as internal time stepping; internal time stepping is making BEPUphysics take multiple steps each time Update is called, causing extremely low framerate. Internal time stepping or its equivalent should be off in both engines for comparison.
2) Yes, it might. But the point is that I need to run it via unity mono runtime. I don't need it for MS .NET.
The idea behind testing it in the normal environment is to pin down possible causes. If the simulation runs substantially faster in the normal environment, it strongly implies something about the unity environment is interfering. That narrows down the search space a lot. It may turn out that there's not much that can be done about environment interference, but then at least you would have an answer.
3) Ok, so how to tune BEPU in this particular case? What settings do I need to use?
Check out the BEPUphysicsDemos ConfigurationHelper. There's a couple of methods like "ApplySemiSpeedySettings" and "ApplySuperSpeedySettings". Play with the values those methods apply to see how fast you can make it while maintaining acceptable quality. You may find that 1 iteration works fine. You can also probably do similar things in PhysX.
Fiddling with the time step duration is another general tuning option.
More specific tuning depends on the simulation. A bunch of boxes in a big pile has fewer axes of tuning than a game setting where there's typically a bunch of different shapes and a complex environment.
Like I said, creating a totally 'fair' comparison is going to be quite tricky- there is no particular configuration which is guaranteed to be equal in relative performance/quality between the two engines.
4) I think it would make a sense to do that direct comparsion. It really matters)
For my purposes, it doesn't really matter.
I'm not really focusing on competing with other physics engines. Knowing the exact relative performance between libraries would rarely change my decisions regarding what changes are needed in BEPUphysics. Instead, my decisions are defined mostly by what I need in my own projects. That will often result in
optimizations and improvements.
I'm glad to see that people use and like the engine- it's free and open source, after all. But it does surprise me a little bit when people use it in place of a native solution like PhysX in Unity