At 14:04 11/04/2002 -0700, brad lafountain wrote: >How much COW does php do?... I saw a post that it does it for arrays? what >else >does it do it for. > > I was thinking that a COW per zval would be good. expecially when you > get into >large arrays. > >$a = array(/*10000 items*/); >$b = $a; >$b[999] = false; > >will this copy all elements or just copy one? >if you had COW per zval this would only result in one new zval not 10000 > > >and as far as overhead of doing this kinda of work.. >alls we would need to do is add something like >zend_uchar should_be_ref to the zval.. >all assignments would be ref's and on a write.. > >just check if should_be_ref is 0 and is_ref is 1. then separete_zval(). > >i dont' know if/how much COW php is handling this now. but i would be >interested in finding out.
It pretty much does all the COW it can. Andi -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php
