Use ThreadLocal caching for ExtendedRandom PRNG contexts - #1255
Merged
Merged
Conversation
taoliult
requested review from
JinhangZhang,
KostasTsiounis,
jasonkatonica and
johnpeck-us-ibm
March 9, 2026 19:30
KostasTsiounis
requested changes
Mar 10, 2026
taoliult
force-pushed
the
main_securerandom_native_2
branch
2 times, most recently
from
March 11, 2026 21:24
75c4eb8 to
71f77f3
Compare
taoliult
force-pushed
the
main_securerandom_native_2
branch
2 times, most recently
from
April 1, 2026 15:18
4a97876 to
fb77737
Compare
johnpeck-us-ibm
approved these changes
Apr 14, 2026
taoliult
force-pushed
the
main_securerandom_native_2
branch
2 times, most recently
from
April 20, 2026 18:30
c8e276f to
ff9268f
Compare
jasonkatonica
requested changes
Apr 22, 2026
taoliult
requested review from
KostasTsiounis,
jasonkatonica and
johnpeck-us-ibm
April 28, 2026 16:07
Collaborator
Author
|
@johnpeck-us-ibm Sorry, I accidentally clicked the refresh button. I noticed that you had already approved this PR, but I’m not sure if you need to click Approve button again because of that. |
taoliult
force-pushed
the
main_securerandom_native_2
branch
from
April 28, 2026 16:17
4d16a3f to
fe5383a
Compare
taoliult
force-pushed
the
main_securerandom_native_2
branch
from
May 14, 2026 17:59
fe5383a to
df3eb8c
Compare
KostasTsiounis
requested changes
May 19, 2026
Add ThreadLocal caching for native PRNG contexts used by ExtendedRandom. Each thread creates and reuses a PRNG context for supported DRBG algorithms. This avoids repeated EXTRAND_create calls when instances are created frequently. Benefits: - Reduce native allocation overhead - Reuse PRNG contexts per thread - Improve performance in RNG-heavy workloads Signed-off-by: Tao Liu <tao.liu@ibm.com>
taoliult
force-pushed
the
main_securerandom_native_2
branch
from
May 21, 2026 15:20
c05f971 to
1de96ad
Compare
This was referenced Jun 3, 2026
jasonkatonica
added a commit
to jasonkatonica/OpenJCEPlus
that referenced
this pull request
Jun 22, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add ThreadLocal caching for native PRNG contexts used by ExtendedRandom. Each thread creates and reuses a PRNG context for supported DRBG algorithms.
This avoids repeated EXTRAND_create calls when instances are created frequently.
Benefits: