fix: #3758 Extrememly poor performance on poorly written grammars by jimidle · Pull Request #3880 · antlr/antlr4
The problem was once again a poorly written hash function, which caused ATN config sets to hash poorly. The poor grammar caused many thousands of DFA states to hash to the same bucket. In your average grammar, this situation would not arise. For now, I have changed that hash function to use the memory address of the slice that contains the configs, though i think that this is sub-optimal. I will revist this as part of a general attack at further performance gains. Signed-off-by: Jim.Idle <jimi@gatherstars.com>
Signed-off-by: Jim.Idle <jimi@gatherstars.com>
parrt
mentioned this pull request
parrt added a commit that referenced this pull request
Nov 20, 2022#3880 Signed-off-by: Terence Parr <parrt@antlr.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters