Skip to content

Performance optimization of RNG#2

Open
AndriyLutskiv wants to merge 1 commit intoDen-k0:lab2from
AndriyLutskiv:patch-1
Open

Performance optimization of RNG#2
AndriyLutskiv wants to merge 1 commit intoDen-k0:lab2from
AndriyLutskiv:patch-1

Conversation

@AndriyLutskiv
Copy link

@AndriyLutskiv AndriyLutskiv commented Apr 17, 2024

I suggest to use more efficient RNG

According to Josh Block

Random random = new Random();
// ефективніший ніж звичайний Random у 5 разів
java.util.concurrent.ThreadLocalRandom random = java.util.concurrent.ThreadLocalRandom.current();

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут не надто багато елементів у масиві, тому це не є вкрай необхідно

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant