On Mon, Feb 4, 2013 at 8:59 PM, Ard Biesheuvel <ard.biesheu...@linaro.org>wrote:
> On 02/04/2013 01:50 PM, Dmitry Stogov wrote: > >> I can't remember if I did any special benchmarks except for bench.php when >> I introduced fast math functions. >> That time, I rearranged the code to allow inlining of the most probable >> paths and added assembler code to catch overflow (C can't do it in optimal >> way). As I remember the bench.php showed some visible improvement. >> >> > OK, in that case I would still recommend using fewer hardcoded numbers and > offsets: please refer to the applied patch, it makes things a bit more > robust. > I completely agree with you and I'll try to fix it when have time. > However, as I don't expect any speedup for ARM in this area, I will not > pursue this any further. > I'm not familiar with ARM architecture, so I don't know if inline assembler may improve performance. > Are there any other optimizations involving inline assembler that you > implemented for PHP? I would like to review them to see if I need to add an > ARM version. > You may take a look into zend_alloca.c. It uses special x86 instructions for bit scanning and overflow checking during address calculation. Thanks. Dmitry. > Cheers, > > Ard. > > >