Re:Google removes SIMD.js support from Chromium
by tmyklebu on Sunday June 04, 2017 @02:05PM
(#14482654)
> Major compilers (LLVM, GCC, Intel) are able to vectorize real world code to a useful extent.
Try compiling this with recent gcc:
uint8_t dumb_checksum(uint8_t *ar) {
uint8_t ans = 0;
for (int i = 0; i < 320; i++) ans += ar[i];
return ans;
}
You don't get satisfactory results. I, at least, don't have a clear mental model of when gcc will do something reasonable and when it will generate a large amount of bad code.
Try compiling this with recent gcc:
You don't get satisfactory results. I, at least, don't have a clear mental model of when gcc will do something reasonable and when it will generate a large amount of bad code.