<!-- All ANTLR contributors provide implementation, maintenance and support for free. We therefore kindly ask that before submitting any issue to ANTLR, you please check off these boxes: - [ ] I have reproduced my issue using the latest version of ANTLR - [ ] I have asked at [stackoverflow](http://stackoverflow.com/questions/tagged/antlr4) - [ ] Responses from the above seem to indicate that my issue could be an ANTLR bug - [ ] I have done a search of the existing issues to make sure I'm not sending in a duplicate Please include the following information: - target information (Java, C++ ...) - smallest possible grammar and code that reproduces the behavior - description of the expected behavior and actual behavior Pointers to suspicious code regions are also very welcome. --> When I use the Cpp parser in multiple threads (around 30+), the performance drops a lot compared to using a single thread. I'm guessing it's the lock/mutex, so I simply removed all locks and re-tested, and it did run a lot faster. But removing locks makes the parser no longer thread-safe, I would like to ask is there any way to improve the performance of multi-threaded parser?