Re: [PHP-DEV] Standard constants as part of the lexer

2011-06-20 Thread Stas Malyshev
Hi! On 6/20/11 4:12 AM, Robert Eisele wrote: I think it depends on the experience of the developers. There are many - halfway ugly - "PHP optimization" tricks on the net. If these are used, the difference wouldn't that much. But constructs like for($i=0; $i If you're microoptimizing, you should

Re: [PHP-DEV] Standard constants as part of the lexer

2011-06-20 Thread Etienne Kneuss
Hi, On Mon, Jun 20, 2011 at 13:12, Robert Eisele wrote: > 2011/6/20 Derick Rethans > >> On Mon, 20 Jun 2011, Robert Eisele wrote: >> >> > The constants true, false and null are used very often. Unfortunately, >> > every usage of either of these constants invokes a constant lookup. >> > There is

Re: [PHP-DEV] Standard constants as part of the lexer

2011-06-20 Thread Robert Eisele
2011/6/20 Derick Rethans > On Mon, 20 Jun 2011, Robert Eisele wrote: > > > The constants true, false and null are used very often. Unfortunately, > > every usage of either of these constants invokes a constant lookup. > > There is no problem with this, constant lookups are fast, but I > > neverth

Re: [PHP-DEV] Standard constants as part of the lexer

2011-06-20 Thread Sebastian Bergmann
Am 20.06.2011 13:00, schrieb Derick Rethans: > Although it's a nice performance increase, I think that breaking > count() as a method name is not a good idea, as I would assume it's > used a lot. Even though count() and strlen() can be optimised that much, > how much does it buy a fully fledged

Re: [PHP-DEV] Standard constants as part of the lexer

2011-06-20 Thread Derick Rethans
On Mon, 20 Jun 2011, Robert Eisele wrote: > The constants true, false and null are used very often. Unfortunately, > every usage of either of these constants invokes a constant lookup. > There is no problem with this, constant lookups are fast, but I > nevertheless implemented these constants d