Range 0 Index   <<   >>


 

From Primitive Performance, Dyalog ’13.

x←?1e6⍴1000

a. ¯1+{≢⍵}⌸(⍳1000),x     1.00
b. ¯1+{≢⍵}⌸(⍳1+⌈/x),x    1.62
      …

max=*x++; for(i=1;i<n;++i){if(max<*x)max=*x; ++x;}

SSE4 (Intel) or AltiVec (IBM), circa 2008

pminsb pmaxsb   8-bit       16 at a time;  factor of 25
pminsw pmaxsw   16-bit       8 at a time;  12
pminsd pmaxsd   32-bit       4 at a time;  6