pmd/pmd-core
Clément Fournier 12e843cb47 Pool names, optimize getNodeKind
NameTest::matches is a very hot spot
in saxon. Profiling shows that most
of its runtime is spent doing virtual
method dispatch on NodeInfo#getNodeKind

We optimise this by making a base class
with the node kind as a field.

Also, we now pool xpath names using saxon's
name pool, which reduces name tests to
integer comparison instead of string.equals

Saxon now spends 80x less time in the name test
overall shaving off 30% of execution time of
XPath rules.
2020-04-17 04:57:08 +02:00
..
2020-04-17 04:57:08 +02:00