Skip to main content

CSS vs. XPath, Conclusion

NOTE: This is part 3 of 3. For the first installment, go here. For the second installment, go here.

Intro

In the last tip I provided benchmarks that showed XPath and CSS performance across various browsers. Since then I've received feedback on some things that my test was missing -- most notably more browser coverage (e.g., Internet Explorer 9 and 10) and testing against a larger and deeper page.

A Solution

In order to make sure these benchmarks are as thorough as possible I've put together an example that demonstrates a large and deep page, and retooled my test script accordingly. Otherwise, everything is pretty much the same as last time (e.g., dual runs to weed out anomalies, 100 test executions for time in seconds, etc.).

Let's dig into the results.