Re: more inline assembler noise

From: Date: Mon, 04 Feb 2013 17:28:26 +0000
Subject: Re: more inline assembler noise
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-65641@lists.php.net to get a copy of this message
On Mon, Feb 4, 2013 at 8:59 PM, Ard Biesheuvel <ard.biesheuvel@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. > > >

« previous php.internals (#65641) next »