[Bug 223314] textproc/ripgrep: expose SIMD options

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Oct 29 22:40:09 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223314

            Bug ID: 223314
           Summary: textproc/ripgrep: expose SIMD options
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch, patch-ready
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs at FreeBSD.org
          Reporter: jbeich at FreeBSD.org
                CC: petteri.valkonen at iki.fi, tobik at freebsd.org
 Attachment #187574 maintainer-approval?(petteri.valkonen at iki.fi)
             Flags:
                CC: petteri.valkonen at iki.fi
             Flags: maintainer-feedback?(petteri.valkonen at iki.fi)

Created attachment 187574
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=187574&action=edit
v1

ripgrep allows to take advantage of SIMD optimizations. On i386 this implies
SSE2 except i686-unknown-freebsd target already forces it, anyway. AVX has to
be enabled explicitly probably because simd crate doesn't consult CPUID.

Before (or AVX=off SIMD=off):

  $ rg --version
  ripgrep 0.7.1
  -AVX -SIMD

After (or AVX=off SIMD=on):

  $ rg --version
  ripgrep 0.7.1
  -AVX +SIMD

After (AVX=on SIMD=on):

  $ rg --version
  ripgrep 0.7.1
  +AVX +SIMD

Build logs (AVX=on SIMD=on):

  10.3 amd64 http://sprunge.us/FEiH
  10.3 i386  http://sprunge.us/BUMb
  11.0 amd64 http://sprunge.us/jKAY
  11.0 i386  http://sprunge.us/iYEb
  12.0 amd64 http://sprunge.us/LdNZ

Benchmark:

  # 10.3-RELEASE i386 with ripgrep AVX=off SIMD=off
  $ cd /usr/ports
  $ time -l rg -l XXX >/dev/null
          0.90 real         1.84 user         3.35 sys
       41808  maximum resident set size
        2595  average shared memory size
          44  average unshared data size
         128  average unshared stack size
        9383  page reclaims
           0  page faults
           0  swaps
       85597  block input operations
           0  block output operations
           0  messages sent
           0  messages received
           0  signals received
        1249  voluntary context switches
        1778  involuntary context switches

  # 10.3-RELEASE i386 with ripgrep AVX=on SIMD=on
  $ cd /usr/ports
  $ time -l rg -l XXX >/dev/null
          0.63 real         1.57 user         3.23 sys
       41528  maximum resident set size
        2580  average shared memory size
          44  average unshared data size
         128  average unshared stack size
        9315  page reclaims
           0  page faults
           0  swaps
       54207  block input operations
           0  block output operations
           0  messages sent
           0  messages received
           0  signals received
        1880  voluntary context switches
        1270  involuntary context switches

Note, either AVX=on or SIMD=on requires lang/rust built with PORT_LLVM=off
(default).
Note2, SIMD=on builds fine on aarch64 but nothing currently uses NEON.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list