3 ms·
You can have an ISA sufficiently generic to run on any CPU, or one sufficiently specific to efficiently exploit SIMD on a particular CPU. Never both. That's why
by immibis 2y ago
You can have an ISA sufficiently generic to run on any CPU, or one sufficiently specific to efficiently exploit SIMD on a particular CPU. Never both. That's why some platforms provider higher-level operations, like element-wise multiplication of packed arrays. I can't see whether the actual WASM2 SIMD instructions are sufficiently generic because apparently I'm rate-limited on GitHub (???) and therefore can't see the spec.
- flohofwoe 2y agohttps://web.archive.org/web/20250429065033/https://webassembly.github.io/spec/core/syntax/types.html https://web.archive.org/web/20250429065033/https://webassemb... Values are hardwired to 128 bits which can be i8x16/i16x8/i32x4/i64x2 or f32x4/f64x2, so that already limits the 'feature surface' drastically. IMHO as long as it covers the most common use cases (e.g. vec4 / mat4x4 floating point math used in games and a couple of common ALU and bit-twiddling operations on integers) that's already quite a bit better than having to fall back to scalar math.
- mdaniel 2y ago> apparently I'm rate-limited on GitHub (???) and therefore can't see the spec. Are you also on Firefox? I've been getting those 429s a lot over the past week or so. I haven't changed my configuration other than I'm religious about the "check for updates" button, but I cannot imagine a world in which my release-branch browser is a novelty. No proxies, yes I run UBO but it is disabled for GH
- eppsilon 2y agoI got some using Orion on iOS yesterday. Same engine as every other iOS browser, so I guess it's sending a user agent GH doesn't like?
- ncruces 2y agoThey were sufficient for me to implement most of `string.h` and get speedups between 4 and 16x vs “portable musl C code,” including sophisticated algorithms such as this one: http://0x80.pl/notesen/2016-11-28-simd-strfind.html http://0x80.pl/notesen/2016-11-28-simd-strfind.html I posted about my efforts here: https://news.ycombinator.com/item?id=43935284 https://news.ycombinator.com/item?id=43935284 Or, if you wanna jump to the code: https://github.com/ncruces/go-sqlite3/blob/main/sqlite3/libc/string.h https://github.com/ncruces/go-sqlite3/blob/main/sqlite3/libc...