Skip to content
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

multi-thread performance vs single thread performance #9

Open
terencechow opened this issue Aug 12, 2019 · 1 comment
Open

multi-thread performance vs single thread performance #9

terencechow opened this issue Aug 12, 2019 · 1 comment

Comments

@terencechow
Copy link

I'm trying to understand the performance difference from the 2 options.

When I ran the multi-threaded test I got an average speed of ~1.5 ms (I have 8 cores). In contrast the average speed of the single thread test is ~0.6ms. That's seems like a significant difference. I wonder if the multi-threaded solution can be optimized to have speeds closer to the single threaded test? I suspect whatever is being synchronized / re-used across threads could just be duplicated (at the cost of more memory). Is this something you'd be interested in? If so if you provide some guidance on where to start looking, I can give it a look

@cs0x7f
Copy link
Owner

cs0x7f commented Aug 15, 2019

There are amounts of factors that might affect the performance degradation when use multi-threading. Most of them depends on CPU archtechture, e.g. cache miss rate, branch prediction miss rate, cpu frequency, exection unit load (especially memory access unit).

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

No branches or pull requests

2 participants