Re: Optimization for ..._MULTIPLY_LONG on more systems

From: Date: Thu, 09 Nov 2006 13:23:10 +0000
Subject: Re: Optimization for ..._MULTIPLY_LONG on more systems
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-26430@lists.php.net to get a copy of this message
Great patch! From my quick tests I got about 35% performance increase. Ah, it needs a little tweak to work on windows, as 'long long' is defined as __int64 (probably we could do a typedef once for all, as there are already many #ifdefs in the code because of this). Nuno ----- Original Message -----
Nice patch! Looks good to me... Any other thoughts?
-----Original Message----- From: Matt Wilmas [mailto:php_lists@realplain.com] Sent: Wednesday, November 08, 2006 8:47 PM To: internals@lists.php.net Subject: [PHP-DEV] Optimization for ..._MULTIPLY_LONG on more systems Hi, Here's an additional ZEND_SIGNED_MULTIPLY_LONG() for platforms with 32-bit longs that don't use the assembly version (so all Windows systems at least?). On my Windows system, mul_function() is 40% faster with this version (no overflow), which makes PHP's * operator 20% faster; with overflow mul_function() is 20% faster (though I don't see any difference with the * operator). The macro is also used in safe_emalloc()... Patch just against 5_2 as the file versions are the only difference. Matt


« previous php.internals (#26430) next »