Re:Optimising Haskell for a tight inner loop
by pbsd on Thursday January 09, 2014 @07:40AM
(#7030099)
I doubt those instructions (especially stos* and movs*, respectively matching memset and memcpy) are going anywhere. Intel has even changed their semantics in recent chips to work on 16-byte or larger chunks, and to have out-of-order memory accesses. Current MOVSB, for instance, should be nearly as fast as SSE/AVX optimized memory transfers.
[ Parent
| on HN ]
Re:Optimising Haskell for a tight inner loop
by userbinator on Thursday January 09, 2014 @09:13PM
(#7034660)
I wouldn't say their semantics have changed but certainly their implementation. The fact that Intel used to recommend against using them but now advises the opposite, suggests that scas/cmps (memchr/memset) could be next. In any case, the thought of one machine instruction doing better than lots of carefully hand-written assembly is nice.