This will at least somewhat improve performance, as confirmed through microbenchmark testing.
const fields are replaced with literal values in the Assembly's IL code, while static readonly fields may be optimized by the JIT, and is not guaranteed to happen. const fields may also lend themselves to stronger optimizations at runtime.
* ThreadSafeRandom Cleanup
This fixes the namespace for ThreadSafeRandom, from ACE -> ACE.Common.
It also adds better Summary descriptions.
The rest of the file changes are simply adding ACE.Common references.
This is mainly commenting and namespace preparation for adding a non-thread safe random class, in effort to reduce lock contention.
* Switch ThreadSafeRandom from lock to ThreadLocal<Random>
For reference: ac99a1b716/src/Common/src/CoreLib/System/Random.cs
This fixes the namespace for ThreadSafeRandom, from ACE -> ACE.Common.
It also adds better Summary descriptions.
The rest of the file changes are simply adding ACE.Common references.
This is mainly commenting and namespace preparation for adding a non-thread safe random class, in effort to reduce lock contention.
* Moving ACE.Server.Physics.Common.Random to ACE.ThreadSafeRandom
replaced the thread discriminator with a lock
renamed "Random" to "ThreadSafeRandom"
renamed "RollDice" functions to the standard "Next"
* deleted Source/ACE.Server/Physics/Common/Random.cs
replaced conditionally omitted and commented code with new name
* renamed source file