Skip to content

[C++] Improve multithreaded performance, fix TSAN error, and fix profiling ATN simulator setup - #3544

Merged
parrt merged 1 commit into
antlr:devfrom
jcking:cpp-atn-sim-opt
Feb 16, 2022
Merged

parrt merged 1 commit into
antlr:devfrom
jcking:cpp-atn-sim-opt

Conversation

@jcking

@jcking jcking commented Feb 16, 2022

Copy link
Copy Markdown
Collaborator

Various small improvements.

  • Improve multithreaded performance by using insert instead of find then insert. This reduces the amount of time spent in critical sections.
  • Fix extremely rare race condition that I introduced as I unlocked then dereferenced an iterator.
  • Fix parser profiling setup. Currently calling setProfile more than once would crash in debug builds.

@jcking

jcking commented Feb 16, 2022

Copy link
Copy Markdown
Collaborator Author

@mike-lischke

@mike-lischke mike-lischke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@parrt This C++ patch can be merged.

@parrt parrt added this to the 4.10 milestone Feb 16, 2022
@parrt

parrt commented Feb 16, 2022

Copy link
Copy Markdown
Member

awesome patch. thanks!

@parrt
parrt merged commit dc95a7d into antlr:dev Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants