You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This FerrousParser.g4 takes 6s to process with antlr tool. It seems to be stuck in SLL(1) static analysis. Could be murmur hash or more likely LL1Analyzer.
@sharwell This likely affects your optimized fork as well.
Simple test rig:
importorg.antlr.runtime.ANTLRFileStream;
importorg.antlr.runtime.ANTLRStringStream;
importorg.antlr.v4.Tool;
importorg.antlr.v4.tool.Grammar;
importorg.antlr.v4.tool.ast.GrammarRootAST;
importjava.io.IOException;
publicclassTestANTLRParse {
publicstaticvoidmain(String[] args) throwsIOException {
longstart = System.nanoTime();
runANTLR(args[0]);
longtime_ns = System.nanoTime() - start;
doubleparseTimeMS = time_ns/(1000.0*1000.0);
System.err.println("Exec time to process "+args[0]+": "+parseTimeMS+"ms");
}
privatestaticvoidrunANTLR(StringgrammarFileName) throwsIOException {
Toolantlr = newTool();
ANTLRStringStreamin = newANTLRFileStream(grammarFileName);
GrammarRootASTgrammarRootAST = antlr.parse(grammarFileName, in);
// Create a grammar from the AST so we can figure out what type it isGrammarg = antlr.createGrammar(grammarRootAST);
antlr.process(g, false);
}
}
I see this on M1 mac mini:
Exec time to process /Users/parrt/tmp/FerrousParser.g4: 5984.826209ms
The text was updated successfully, but these errors were encountered:
I'll be touching up on this very soon, most likely on the weekend. I got some nice PRs ready and i'm excited to share them finally. Also, that test rig doesn't seem like a good idea, because you don't even warumup the VM/JIT, so the results will be all over the place. I suggest at least adding a loop before the actual test, calling the function to test a couple thousand times, so it get's JITed into the global code cache.
issue was identified in plugin by @KitsuneAlex
This FerrousParser.g4 takes 6s to process with antlr tool. It seems to be stuck in SLL(1) static analysis. Could be murmur hash or more likely LL1Analyzer.
@sharwell This likely affects your optimized fork as well.
Simple test rig:
I see this on M1 mac mini:
The text was updated successfully, but these errors were encountered: