[PATCH] Lazy symbol table initialization
| From: | Dmitry Stogov | Date: | Fri, 25 Apr 2008 13:29:21 +0000 |
| Subject: | [PATCH] Lazy symbol table initialization | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-37214@lists.php.net to get a copy of this message | ||
Hi,
The proposed patch delays EG(active_symbol_table) initialization till it
's really needed. Most functions don't need EG(active_symbol_table) at
all, as they use IS_CV variables and HashTable initialization and
updating just waste of time.
The patch doesn't break any PHPT tests, it gives about 12% speedup on
bench.php and also shows some speed improvement on real-life
applications (with opcode cache).
In case some extension needs EG(active_symbol_table) it can initialize
it using the following code:
if (!EG(active_symbol_table)) {
zend_rebuild_symbol_table(TSRMLS_C);
}
I'm going to commit the patch on next week in case of no objections.
Thanks. Dmitry.