Places where we can optimize PHP -------------------------------- Easy - Fix auto_globals_jit - I don't actually think this works at all right now. - Make ap_add_common_vars and ap_add_cgi_vars part of the server jit and we might be able to come up with a faster implementation of ap_add_common_vars. One that doesn't need to do a qsort with a strcasecmp cmp function on each and every request. - zend_cleanup_function_data is by far the most called function in the engine. And all it does is: if (function->type == ZEND_USER_FUNCTION) { zend_cleanup_op_array_data((zend_op_array *) function); } Hard - Go through and clean up cache lines in the executor Investigate - Is doing a table_get(subprocess_env, "HTTP_COOKIE") really the fastest way to check if we have a cookie on a request? table_gets are expensive and we do this one on every request whether or not there is a cookie. - Shortcut zend_ini_deactivate