| | 36 | |
| | 37 | Travis suggested that misaligned case should remain unchanged. Interestingly, patched code behaves quite differently for misaligned case: |
| | 38 | {{{ |
| | 39 | > python -m timeit -s "from numpy import zeros; x = zeros(10000,'h'); x.flags['ALIGNED'] = False" "x.fill(1)" |
| | 40 | 10000 loops, best of 3: 101 usec per loop |
| | 41 | > python -m timeit -s "from numpy import zeros; x = zeros(10000,'i'); x.flags['ALIGNED'] = False" "x.fill(1)" |
| | 42 | 10000 loops, best of 3: 106 usec per loop |
| | 43 | > python -m timeit -s "from numpy import zeros; x = zeros(10000,'d'); x.flags['ALIGNED'] = False" "x.fill(1)" |
| | 44 | 10000 loops, best of 3: 112 usec per loop |
| | 45 | }}} |