eclipse-rdf4j / rdf4j

Eclipse RDF4J: scalable RDF for Java
https://rdf4j.org/
BSD 3-Clause "New" or "Revised" License
363 stars 164 forks source link

jjMoveNfa_0 in SyntaxTreeBuilderTokenManager is unusually slow #1002

Closed hmottestad closed 6 years ago

hmottestad commented 6 years ago

The jjMoveNfa_0 in SyntaxTreeBuilderTokenManager is taking up 40% of the execution time, it seems, for executing SHACL rules that generate a lot of SPARQL queries.

We need to:

hmottestad commented 6 years ago

Benchmark results before changes:

Java 8

Benchmark                  Mode  Cnt   Score   Error  Units
SPARQLParseBenchmark.temp  avgt   40  74.169 ± 1.959  ms/op

Java 9

Benchmark                  Mode  Cnt   Score   Error  Units
SPARQLParseBenchmark.temp  avgt   40  74.248 ± 1.105  ms/op
hmottestad commented 6 years ago

Benchmark results after changes:

Java 8

Benchmark                  Mode  Cnt   Score   Error  Units
SPARQLParseBenchmark.temp  avgt   40  32.390 ± 0.519  ms/op

Java 9

Benchmark                  Mode  Cnt   Score   Error  Units
SPARQLParseBenchmark.temp  avgt   40  36.420 ± 0.727  ms/op