[Numpy-svn] [numpy/numpy] 75df68: ENH: tell gcc to unroll strided copy loops

GitHub noreply@github....
Sun Jun 23 08:14:06 CDT 2013


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: 75df68b5ca238eabc2de144dce08d481c59ffcaf
      https://github.com/numpy/numpy/commit/75df68b5ca238eabc2de144dce08d481c59ffcaf
  Author: Julian Taylor <jtaylor.debian@googlemail.com>
  Date:   2013-06-13 (Thu, 13 Jun 2013)

  Changed paths:
    M numpy/core/include/numpy/npy_common.h
    M numpy/core/setup.py
    M numpy/core/setup_common.py
    M numpy/core/src/multiarray/lowlevel_strided_loops.c.src

  Log Message:
  -----------
  ENH: tell gcc to unroll strided copy loops

The strided copy loops profit a lot from unrolling as the number of
operations executed is in each iterations very small.
GCC needs to be told explicitly to do unrolling even on O3.

Unrolling is only profitable if the move can be done in a single
instruction, else the increased code size makes it slower, thus the flag
is only used for operations on element sizes less equal the native
pointer size.

Tested to improve performance of by 20-50% on intel core2duo, xeon
5xxx/7xxx and amd phenom x4.


  Commit: f361c6b073316f3ee59ac23413155145b27aed90
      https://github.com/numpy/numpy/commit/f361c6b073316f3ee59ac23413155145b27aed90
  Author: Charles Harris <charlesr.harris@gmail.com>
  Date:   2013-06-23 (Sun, 23 Jun 2013)

  Changed paths:
    M numpy/core/include/numpy/npy_common.h
    M numpy/core/setup.py
    M numpy/core/setup_common.py
    M numpy/core/src/multiarray/lowlevel_strided_loops.c.src

  Log Message:
  -----------
  Merge pull request #3429 from juliantaylor/copy-unroll

ENH: tell gcc to unroll strided copy loops


Compare: https://github.com/numpy/numpy/compare/6dd20ff5fa5b...f361c6b07331


More information about the Numpy-svn mailing list