Re: Optimization for ..._MULTIPLY_LONG on more systems

From: Date: Mon, 21 Jul 2008 20:16:38 +0000
Subject: Re: Optimization for ..._MULTIPLY_LONG on more systems
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-39146@lists.php.net to get a copy of this message
On 17.07.2008, at 16:20, Matt Wilmas wrote:
Hi all, Replying to this OLD message about the ZEND_SIGNED_MULTIPLY_LONG() change... It's just a small thing, but it's been on the TODO for a while, so I attempted to correct the issue with my original patch that used "long long" type, which wasn't available on the older MSVC versions, etc. I created a zend_long64 type (when possible, #if logic copied from snprintf.h's WIDE_INT definition), hopefully it's mostly correct/OK, and maybe it can be used elsewhere too. Since the new memory manager, ..._MULTIPLY_LONG() isn't used for safe_emalloc() anymore, so I made another safe_address() variation (overflow safe, I hope). I noticed ~0.6% slowdown on bench.php, though it seems this zend_ulong64 version should use fewer cycles than the doubles one for sure, if someone wants to analyze it more. :-) Finally, is it even possible to also have a Windows assembly version of these 2 things, where I left the comments? There is for zend_mm_[high|low]_bit(), but they're very simple... http://realplain.com/php/multiply_long.diff http://realplain.com/php/multiply_long_5_3.diff
any takers for this patch? otherwise it will probably not make the cut by the 24th regards, Lukas Kahwe Smith mls@pooteeweet.org

« previous php.internals (#39146) next »