diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2014-10-05 04:20:47 +0000 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2014-10-05 04:20:47 +0000 |
commit | a3b23751aeb6c9e84829010e20b44545ef4da9ff (patch) | |
tree | 40ea920ba064d1f0ddcc8e3fe25c8d159c2f5b61 /docs/images/caution.png | |
parent | e66356715c8ab207350bc30904b30c4de4515506 (diff) |
Optimize XPath document order comparator
Node ancestor search now terminates early if ancestor is found before the
document root (only happens if nodes were at the same depth).
Sibling search now steps synchronously for left and right nodes to avoid
worst-case performance when we go in the wrong direction and have to scan
a big list (this comes at the cost of average performance since in the
best case we do 2x more operations).
Node comparison is now done using node pointers to elide some null
comparisons since the structure of the search guarantees that they are
handled properly.
All of the above results in ~2x faster document order comparison on
complex documents.
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1050 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'docs/images/caution.png')
0 files changed, 0 insertions, 0 deletions