Hi Sara, At first I don't understand why you are trying to deallocate variable.
+ if (CG(active_op_array)->T == (parent->u.var - 1)) { + CG(active_op_array)->T--; + } Isn't the same variable reused as result of ZEND_FETCH_DIM? The rest of patch seems proper, but I am not sure about place. Why we optimize @$a['b'] but not @$a->b and @$a->b()? I would prefer to find more general solution. Dmitry. > -----Original Message----- > From: Sara Golemon [mailto:[EMAIL PROTECTED] > Sent: Sunday, January 21, 2007 12:57 AM > To: Dmitry Stogov > Cc: internals@lists.php.net; 'Andrei Zmievski'; 'Andi Gutmans' > Subject: Re: [PHP-DEV] Giving Globals the CV treatment [WAS: > Runtime JIT Proposals] > > > One last thought on global CVs... How's this for fixing the > loophole of: > > ZEND_BEGIN_SILENCE > ZEND_FETCH_R $0 '_POST' (global) > ZEND_FETCH_DIM_R $1 $0 'foo' > ZEND_END_SILENCE > > I know it seems like a pretty minor gain, but (A) using @$_GET['foo'] > isn't an uncommon practice, and (B) pushing this all into CV based > FETCH_DIM ops would greatly simplify the runtime JIT stuff > I'm working on. > > The short-version summary of this patch is that when the > engine is going > to do a FETCH_DIM based on prior nodes, it checks the top of the > backpatch stack to see where the container element is coming from, if > it's coming from a simple FETCH, it rewrites that to a > FETCH_DIM, rather > than adding a new element to the BP stack. > > -Sara > > P.S. - Bench numbers follow (0.1% difference): > > unpatched patched > simple 0.472 0.473 > simplecall 1.914 1.916 > simpleucall 2.920 2.920 > simpleudcall 3.507 3.507 > mandel 2.056 2.055 > mandel2 3.273 3.277 > ackermann(7) 3.389 3.390 > ary(50000) 0.157 0.157 > ary2(50000) 0.138 0.138 > ary3(2000) 1.057 1.056 > fibo(30) 9.789 9.750 > hash1(50000) 0.395 0.396 > hash2(500) 0.300 0.300 > heapsort(20000) 0.770 0.771 > matrix(20) 0.508 0.508 > nestedloop(12) 0.872 0.872 > sieve(30) 0.640 0.640 > strcat(200000) 0.289 0.289 > -------------------------------- > Total 32.446 32.416 > > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php