Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45968 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59711 invoked from network); 6 Nov 2009 10:35:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Nov 2009 10:35:16 -0000 Authentication-Results: pb1.pair.com header.from=yoarvi@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=yoarvi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.44 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: yoarvi@gmail.com X-Host-Fingerprint: 209.85.160.44 mail-pw0-f44.google.com Received: from [209.85.160.44] ([209.85.160.44:58996] helo=mail-pw0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7B/E7-11366-2EBF3FA4 for ; Fri, 06 Nov 2009 05:35:15 -0500 Received: by pwj15 with SMTP id 15so590949pwj.23 for ; Fri, 06 Nov 2009 02:35:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=ASLtxCnNDd+HwqN0/ynZUCGcWm9Uz49vwThTIa4KmBA=; b=FoPXGH5MXjf+FQEIQF/s0wLSe320zhafZYIZId2MogFmYdXwHLzi1RTztAM2/Cqd6k ymmJLZPK5hcfL8lluXl12fFsAVVMrc9Lfnr6ty+t8ETvIu2VM/l02tmwXd9GPeIJdwx6 JWEiSmJ1BOz+hS5PuiI0yj9bV7zQjbCgus/mo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=RA8kSD1kEWfly3qTlO+Fh4b/pIJloo8xlSXd+ps7ZNMsps+V6uUpshD5KEBnkSiLmY rYHw3nh9JefPcOl728Ju8r0kR7m3mjXaTCN3FzQwC5S2bG1P0YUuVTd2p0KFzXrkqQ7x HMOwOhXn/qYL1s44xaHGf8Br4e11MrAmzbFyU= MIME-Version: 1.0 Received: by 10.142.248.2 with SMTP id v2mr438169wfh.177.1257503712385; Fri, 06 Nov 2009 02:35:12 -0800 (PST) In-Reply-To: <4AF360CC.7010508@zend.com> References: <4AF360CC.7010508@zend.com> Date: Fri, 6 Nov 2009 16:05:12 +0530 Message-ID: To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Feedback requested on using #defines to improve the performance of the TSRMG macro From: yoarvi@gmail.com (Arvind Srinivasan) Hi, I've updated my patch based on your feedback. http://bitbucket.org/arvi/arviq/src/tip/arvi-16-ts_allocate_reserved_id incorporates the following changes: * xxx_globals_id replaced with XXX_GLOBALS_ID only when used in macros and not in init code etc * ts_allocate_reserved_id renamed to ts_reserve_id as Stas pointed out that it doesn't actually allocate anything * MAX_RESERVED_IDS set to 20. I have assigned upto 18 so far, but I didn't do the win32 ones as I don't have a dev environment on Windows * ts_reserve_id doesn't allow 0 as a value for size or for rsrc_id The memory impact of reserving ids = sizeof(tsrm_resource_type) * MAX_RESERVED_IDS * NUM_THREADS = 16 * MAX_RESERVED_IDS * NUM_THREADS Please let me know if the diffs above look okay and if so I'll create a bug to track the patch. I ran 'make test' to verify that the patch didn't cause regressions. I haven't changed cwd_globals_id to use ts_reserve_id/CWD_GLOBALS_ID, since tsrm_virtual_cwd is in the TSRM directory and all the XXX_GLOBALS_ID are defined in the Zend directory. I will shortly be proposing to move tsrm_virtual_cwd to the Zend directory and so I left CWD_GLOBALS_ID as is in the list of reserved ids. Thanks, Arvi