Skip to content

Remove thread_local in dllexported function #1990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

StableAgOH
Copy link

Fix #1845.

@StableAgOH
Copy link
Author

@an-tao CI was passed in my repository. Request for re-run.

@an-tao an-tao requested a review from marty1885 May 10, 2025 12:56
@marty1885
Copy link
Member

@StableAgOH Can you benchmark the performance difference? The reason for thread_local was to buffer some randomness generated from the random API. Random can have a high overhead per call. thread_local allows extra randomness be reused. (static does not work as the random function must be thread safe)

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.

Does not build as shared library
2 participants