Parsing with C++ target 5x slower than Java

55 views
Skip to first unread message

Olof Wolgast

unread,
Jun 30, 2019, 6:02:06 AM6/30/19
to antlr-discussion

Hi,


I recently migrated a project from Java to C++. I built the C++ runtime with Visual Studio Community 2019 which I also use for everything else in the C++ project. All my tests passes which shows that the parsing itself works the same for both targets.


The actual parsing, i.e. call to top rule in the parser object, for C++ target is about 5x slower than Java target even though the C++ code is built with release configuration optimized for speed and Java is executed in Eclipse debug mode!


The files parsed in the tests are about 500k. I can provide the grammar and data to parse if needed.


Anyone with a clue on why and what can be done?


Kind Regards,

Olof

Olof Wolgast

unread,
Jun 30, 2019, 6:02:37 AM6/30/19
to antlr-discussion
Forgot to mention that I'm using antlr 4.7.2
Reply all
Reply to author
Forward
0 new messages