On Apr 2, 2014, at 3:14 PM, Chris Lattner <[email protected]> wrote:

> On Apr 2, 2014, at 12:14 PM, Chris Lattner <[email protected]> wrote:
> 
>> On Apr 2, 2014, at 10:27 AM, Roman Divacky <[email protected]> wrote:
>> 
>>> Author: rdivacky
>>> Date: Wed Apr  2 12:27:03 2014
>>> New Revision: 205436
>>> 
>>> URL: http://llvm.org/viewvc/llvm-project?rev=205436&view=rev
>>> Log:
>>> Extend the SSE2 comment lexing to AVX2. Only 16byte align when not on AVX2.
>>> 
>>> This provides some 3% speedup when preprocessing gcc.c as a single file.
>> 
>> Nice!
> 
> I haven’t looked closely at them, but would any of the SSE 4.2 “string 
> processing” instructions be helpful here?

For simply scanning for '/', SSE4.2 won't be a win; it's usually not 
significantly faster than PCMPEQB + PMOVMSKB in strchr-type loops.

One could use it to search for "*/" instead, which would be somewhat more 
interesting.  There's no 32B VPCMPESTRI however, so if there aren't many 
false-positive '/' characters in block comments (I expect this to be the case), 
then using AVX2 to scan for '/' should still win.

– Steve
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to