summaryrefslogtreecommitdiff
path: root/tests/test_xpath_paths.cpp
AgeCommit message (Collapse)Author
2014-10-20XPath: Introduce _first/_any set evaluation modesArseny Kapoulkine
Sometimes when evaluating the node set we don't need the entire set and only need the first element in docorder or any element. In the absence of iterator support we can still use this information to short-circuit traversals. This does not have any effect on straightforward node collection queries, but frequently improves performance of complex queries with predicates etc. XMark benchmark gets 15x faster with some queries enjoying 100x speedup on 10 Mb dataset due to a significant complexity improvement. git-svn-id: https://pugixml.googlecode.com/svn/trunk@1067 99668b35-9821-0410-8761-19e4c4f06640
2014-10-18XPath: Extend the descendant-or-self optimizationArseny Kapoulkine
Use descendant-or-self::node() transformation for self, descendant and descendant-or-self axis. Self axis should be semi-frequent; descendant axes should not really be used with // but if they ever are the complexity of the step becomes quadratic so it's better to optimize this if possible. git-svn-id: https://pugixml.googlecode.com/svn/trunk@1063 99668b35-9821-0410-8761-19e4c4f06640
2014-10-16XPath: Optimize attribute axis lookupArseny Kapoulkine
When looking for an attribute by name, finding the first attribute means we can stop looking since attribute names are unique. This makes some queries faster by 40%. Another very common pattern in XPath queries is finding an attribute with a specified value using a predicate (@name = 'value'). While we perform an optimal amount of traversal in that case, there is a substantial overhead with evaluating the nodes, saving and restoring the stack state, pushing the attribute node into a set, etc. Detecting this pattern allows us to use optimized code, resulting in up to 2x speedup for some queries. git-svn-id: https://pugixml.googlecode.com/svn/trunk@1061 99668b35-9821-0410-8761-19e4c4f06640
2014-10-15XPath: Fix optimization bug with //name[last()]Arseny Kapoulkine
The actual condition for the optimization is invariance from context list -- this includes both position() and last(). Instead of splitting the posinv concept just include last() into non-posinv expressions - this requires sorting for boolean predicates that depend on last() and do not depend on position(). These cases should be very rare. git-svn-id: https://pugixml.googlecode.com/svn/trunk@1060 99668b35-9821-0410-8761-19e4c4f06640
2014-10-05tests: Add XPath sorting testArseny Kapoulkine
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1054 99668b35-9821-0410-8761-19e4c4f06640
2014-10-05tests: Add XPath sorting tests and a simple test for numeric predicatesArseny Kapoulkine
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1051 99668b35-9821-0410-8761-19e4c4f06640
2014-09-23tests: Add one more XPath optimization testArseny Kapoulkine
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1022 99668b35-9821-0410-8761-19e4c4f06640
2014-09-23tests: More XPath testsArseny Kapoulkine
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1020 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29tests: Minor fixesarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@691 99668b35-9821-0410-8761-19e4c4f06640
2010-08-29tests: Added XPath tests for attribute contextarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@664 99668b35-9821-0410-8761-19e4c4f06640
2010-07-19Set svn:eol-style to native for all text filesarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@607 99668b35-9821-0410-8761-19e4c4f06640
2010-05-30tests: Added more Xalan testsarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@473 99668b35-9821-0410-8761-19e4c4f06640
2010-05-30tests: Added tests for principal node types with attributes for all axes ↵arseny.kapoulkine
that can return attributes git-svn-id: http://pugixml.googlecode.com/svn/trunk@471 99668b35-9821-0410-8761-19e4c4f06640
2010-05-29tests: Added more Xalan testsarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@467 99668b35-9821-0410-8761-19e4c4f06640
2010-05-29tests: Added some axis Xalan tests, extended all axis tests to include ↵arseny.kapoulkine
attribute context nodes git-svn-id: http://pugixml.googlecode.com/svn/trunk@465 99668b35-9821-0410-8761-19e4c4f06640
2010-05-09Removed document order optimization (it helps on a tiny percentage of ↵arseny.kapoulkine
queries), XPath tests now compute their own order git-svn-id: http://pugixml.googlecode.com/svn/trunk@400 99668b35-9821-0410-8761-19e4c4f06640
2010-05-06Integrated changes from unicode branch to trunkarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@383 99668b35-9821-0410-8761-19e4c4f06640
2009-11-08tests: Final coverage improvementsarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@229 99668b35-9821-0410-8761-19e4c4f06640
2009-11-08tests: More coverage testsarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@225 99668b35-9821-0410-8761-19e4c4f06640
2009-11-08tests: Extracted generic tests in a separate header, better filter tests, ↵arseny.kapoulkine
some API tests added git-svn-id: http://pugixml.googlecode.com/svn/trunk@221 99668b35-9821-0410-8761-19e4c4f06640
2009-11-08tests: Mostly complete coverage of XPath W3Carseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@217 99668b35-9821-0410-8761-19e4c4f06640
2009-11-08tests: Added node test tests, added abbreviated step/axis testsarseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@212 99668b35-9821-0410-8761-19e4c4f06640
2009-11-04tests: Completed function library tests, added namespace axis and variable ↵arseny.kapoulkine
reference tests git-svn-id: http://pugixml.googlecode.com/svn/trunk@204 99668b35-9821-0410-8761-19e4c4f06640
2009-11-03tests: Added tests for all axes except namespacearseny.kapoulkine
git-svn-id: http://pugixml.googlecode.com/svn/trunk@201 99668b35-9821-0410-8761-19e4c4f06640