facebook/hhvm — pull request #2868 by danslo (2014-06-06 06:22:30+00:00)
Title: make SimpleXML boolean casts even faster

This is a follow up to PR #2855.

When we need to build our element's child tree (sxe_get_prop_hash) to
determine if it casts to true/false, we can get away with bailing after
finding the first element.

In my small Magento siege tests these result in significant
improvements:

Before:
Transactions: 1551 hits
Transaction rate: 51.79 trans/sec
Lowest response time: 97ms
Callgrind: http://i.imgur.com/npxMo0q.png

After:
Transactions: 1730 hits
Transaction rate: 58.43 trans/sec
Lowest response time: 89ms
Callgrind: http://i.imgur.com/Dgojb9Y.png