[poppler] [PATCH 8/8] SplashXPathScanner: Force inlining of addIntersection
Stefan BrĂ¼ns
stefan.bruens at rwth-aachen.de
Sun May 27 04:10:37 UTC 2018
The majority of the code in addIntersection can be optimized away for
vertical (x0 == x1) and horizontal (count == 0) segments, thus the inlined
code is less than the function call setup alone.
This leaves diagonal segments as the only remaining call site, i.e.
inlining here is a net win as well.
Reduces runtime for fdo#96728 (runsforever-poppler.pdf) from 1442 seconds
to 1239 seconds (86%), and fdo#78728 (surf-types.pdf) from ~ 5.0 seconds
to 4.7 seconds.
---
splash/SplashXPathScanner.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/splash/SplashXPathScanner.cc b/splash/SplashXPathScanner.cc
index 6c0fbe05..3d94879c 100644
--- a/splash/SplashXPathScanner.cc
+++ b/splash/SplashXPathScanner.cc
@@ -323,6 +323,7 @@ void SplashXPathScanner::computeIntersections() {
}
}
+inline
GBool SplashXPathScanner::addIntersection(double segYMin, double segYMax,
int y, int x0, int x1, int count) {
SplashIntersect intersect;
--
2.16.3
More information about the poppler
mailing list