Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34887 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31718 invoked by uid 1010); 23 Jan 2008 18:10:01 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 31703 invoked from network); 23 Jan 2008 18:10:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jan 2008 18:10:01 -0000 Authentication-Results: pb1.pair.com smtp.mail=nlopess@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=nlopess@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 212.55.154.25 as permitted sender) X-PHP-List-Original-Sender: nlopess@php.net X-Host-Fingerprint: 212.55.154.25 relay5.ptmail.sapo.pt Linux 2.4/2.6 Received: from [212.55.154.25] ([212.55.154.25:38024] helo=sapo.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 76/47-17042-8F287974 for ; Wed, 23 Jan 2008 13:10:01 -0500 Received: (qmail 11371 invoked from network); 23 Jan 2008 18:09:56 -0000 Received: from unknown (HELO sapo.pt) (10.134.35.207) by relay6 with SMTP; 23 Jan 2008 18:09:56 -0000 Received: (qmail 399 invoked from network); 23 Jan 2008 17:42:34 -0000 X-AntiVirus: PTMail-AV 0.3-0.92.0 X-Virus-Status: Clean (0.00708 seconds) Received: from unknown (HELO pc07654) (nunoplopes@sapo.pt@[85.240.49.159]) (envelope-sender ) by mta12 (qmail-ldap-1.03) with SMTP for ; 23 Jan 2008 17:42:34 -0000 Message-ID: <18976126AE41408392C4407AFA8C602D@pc07654> To: "Dmitry Stogov" Cc: "PHP Internals List" References: <4794F6DA.8010400@zend.com> <247E16805B904E159ACE8E1EC4CF1D5F@pc07654> <479702A4.90607@zend.com> In-Reply-To: <479702A4.90607@zend.com> Date: Wed, 23 Jan 2008 17:42:27 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Windows Mail 6.0.6000.16480 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16545 Subject: Re: [PHP-DEV] Segmented argument_stack From: nlopess@php.net ("Nuno Lopes") >> As a side note, I think the following code could be optimized: > > Probably it could, but note that the code not just moves the stack > pointer, but also destroys arguments there (zval_ptr_dtor). > >> + while (zend_vm_stack_top(TSRMLS_C) != stack_frame) { >> + zval *stack_zval_p = zend_vm_stack_pop(TSRMLS_C); >> + zval_ptr_dtor(&stack_zval_p); >> } >> >> I think you can simply discard the last n ptrs on the stack. A >> zend_vm_stack_pop(num_elements) would do the trick (or a >> zend_vm_stack_pop_until(stack_frame)). That way the function call cleanup >> would be a little faster. > > May be I misunderstood you. Lets commit unmodified patch and then you'll > show me a way to optimize it. Uhm ok. Maybe I overlooked the issue. Please commit the patch and I'll review it again. Thanks, Nuno