forked from PaperMC/Paper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace SimpleRandom with (Simple)ThreadUnsafeRandom
ThreadUnsafeRandom is a random implementation that is identical to LegacyRandomSource behaviourally, but without the thread checks. SimpleThreadUnsafeRandom is ThreadUnsafeRandom except with its nextInt(int) function replaced with a faster but more biased implementation when bound is very large. Additionally, replace Level/Entity randoms with ThreadUnsafeRandom. This avoids the expensive CAS logic at the expense of losing the thread check.
- Loading branch information
1 parent
7e789e8
commit afb5b13
Showing
4 changed files
with
323 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.