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?

Submitter:  Nick Welch <mackstann>
Submitted:  Thu 19 Aug 2010 05:17:51 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Invalid
Privacy:  Public Assigned 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>
Group 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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-08-20 bonzini StatusNone Invalid
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code