Skip to content

Performance/overhead with disabled pthread vs. pthread but single threaded #15914

Answered by kripken
svenpilz asked this question in Q&A
Discussion options

You must be logged in to vote

Just enabling pthreads has the effect of making various things use actual locks (like malloc, file operations, etc.). Also atomic operations are actually atomic. Both of those slowdowns happen even if you never create another thread.

A 10% slowdown is more than I'd expect, though, so it might be interesting to profile in the browser devtools and see how the profiles differ between the two builds - that diff could show interesting things.

Replies: 3 comments 15 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by svenpilz
Comment options

You must be logged in to vote
1 reply
@sbc100
Comment options

Comment options

You must be logged in to vote
14 replies
@sbc100
Comment options

@svenpilz
Comment options

@svenpilz
Comment options

@svenpilz
Comment options

@Mintyboi
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants