buggrep - Bugs: bug #30821, Support new SSE 4.2 string...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #30821: Support new SSE 4.2 string searching instructions?

Submitted by:  Nick Welch <mackstann>
Submitted on:  Thu 19 Aug 2010 05:17:51 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: Closed

Thu 19 Aug 2010 05:25:56 PM UTC, comment #2:

Ah, good to know that glibc handles this. Thanks for the explanation.

Nick Welch <mackstann>
Thu 19 Aug 2010 05:21:29 PM UTC, comment #1:

Recent glibc already uses SSE instructions for strstr and friends. It's much easier from a maintainer's point of view to rely on libc to implement optimizations than it is to complicate multiple projects with assembly-specific hacks, especially since on GNU/Linux systems, it won't provide any speedups above what using glibc already provides.

Eric Blake <ericb>
Project Member
Thu 19 Aug 2010 05:17:51 PM UTC, original submission:

Here is an implementation of strstr using these new instructions: <http://www.strchr.com/strcmp_and_strlen_using_sse_4.2> (you actually might not actually want to read the code if you plan on implementing this, as it does not appear to be made available under a free license)

It could possibly provide a performance boost in i3/i5/i7 and subsequent CPUs. Right now that might limit its usefulness, but after a few years I'm sure SSE 4.2 support should be a lot more widespread.

The Boyer-Moore and other algorithms(?) grep uses might end up being faster anyway, so this would definitely be an experiment. I also don't know if GNU or the grep maintainers have philosophical problems with implementing CPU-specific assembly code like these, but I figured it was at least worth mentioning.

Nick Welch <mackstann>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bonzini (Updated the item)
  • -unavailable- added by ericb (Posted a comment)
  • -unavailable- added by mackstann (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 20 Aug 2010 10:24:13 AM UTCbonziniStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1