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

Reduce contention in DFA #13

Closed
sharwell opened this issue Apr 18, 2014 · 2 comments
Closed

Reduce contention in DFA #13

sharwell opened this issue Apr 18, 2014 · 2 comments
Assignees

Comments

@sharwell
Copy link
Owner

In multithreaded parsing scenarios, contention in DFAState.getTarget and DFAState.setTarget can increase CPU usage dramatically, according to the following report.
http://stackoverflow.com/q/23120555/138304

The following image shows the performance improvement of the rm-contention branch as of commit 57a77e1. The test was performed with 20 threads on a machine with 4 cores + hyperthreading.

image

@sharwell sharwell self-assigned this Apr 18, 2014
@sharwell
Copy link
Owner Author

sharwell commented Aug 6, 2014

The following shows the performance of commit 5f70f34. The test was performed with 20 threads on a machine with 4 cores + hyperthreading, but the processor is a bit slower than the one from the previous test.

This commit removes synchronization locks from the "fast path" in SparseEdgeMap<T>, and marks some types and methods final to (theoretically) improve the ability of the JIT to inline calls to them.

image

@sharwell
Copy link
Owner Author

Fixed in a86458f

sharwell pushed a commit that referenced this issue Jun 7, 2016
sharwell pushed a commit that referenced this issue Jun 7, 2016
sharwell pushed a commit that referenced this issue Jun 7, 2016
sharwell pushed a commit that referenced this issue Nov 23, 2016
Additionally a warning was fixed (std::move prevents copy elision)
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

1 participant