I just ran a quick benchmark on this and I'm not seeing a significant
real world change for Facebook's codebase. (definitely less than 1%)
This was a pretty small test, without a lot of code execution, so I could
see other applications doing better. I'm pretty neutral on this one,
it's not a really big change so might be worth adding if it's going to
give a few applications out there a gain, but I couldn't see doing this
everywhere of course.
-shire
Hi,
Something that could give arrays a boost would be to:
- pool all string literals in each file
- give each stringl iteral an id (unique in the loaded environment)
- bind early all array access with string literals (a common occurence), so
they don't need to be resolved with a hashmap lookup, but rather, a direct
stirng literal id lookup.
The benefit of this approach are:
- There's no need to generate a hashmap in the first place
- String literal id-s are unique integers and have no conflicts, so no need
to do conflict resolution.
That would help with objects as well.
Regards,
Stan Vassilev
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php