Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Oct 2017 22:40:07 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 223314] textproc/ripgrep: expose SIMD options
Message-ID:  <bug-223314-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D223314

            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@FreeBSD.org
          Reporter: jbeich@FreeBSD.org
                CC: petteri.valkonen@iki.fi, tobik@freebsd.org
 Attachment #187574 maintainer-approval?(petteri.valkonen@iki.fi)
             Flags:
                CC: petteri.valkonen@iki.fi
             Flags: maintainer-feedback?(petteri.valkonen@iki.fi)

Created attachment 187574
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D187574&action=
=3Dedit
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=3Doff SIMD=3Doff):

  $ rg --version
  ripgrep 0.7.1
  -AVX -SIMD

After (or AVX=3Doff SIMD=3Don):

  $ rg --version
  ripgrep 0.7.1
  -AVX +SIMD

After (AVX=3Don SIMD=3Don):

  $ rg --version
  ripgrep 0.7.1
  +AVX +SIMD

Build logs (AVX=3Don SIMD=3Don):

  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=3Doff SIMD=3Doff
  $ 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=3Don SIMD=3Don
  $ 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=3Don or SIMD=3Don requires lang/rust built with PORT_LLVM=
=3Doff
(default).
Note2, SIMD=3Don builds fine on aarch64 but nothing currently uses NEON.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-223314-13>