Re: An optimization idea

From: Date: Mon, 10 Nov 2008 22:32:58 +0000
Subject: Re: An optimization idea
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-41845@lists.php.net to get a copy of this message
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

« previous php.internals (#41845) next »