5 ms·
Very exciting. Running some of the demos on Firefox Nightly (it's had SIMD and Typed Objects for a while), there's a fairly consistent 3x speedup. The Mandelbro
by thomasfoster96 11y ago
Very exciting. Running some of the demos on Firefox Nightly (it's had SIMD and Typed Objects for a while), there's a fairly consistent 3x speedup. The Mandelbrot demo at 70fps is pretty cool.
By the way, if you've been looking to speed up your JavaScript code I'd start considering SIMD - it's highly unlikely WebCL is going to be implemented in major browsers, and the next version of WebGL looks to be a while away still.
- higherpurpose 11y agoIs OpenCL even necessary anymore with the arrival of SPIR-V?
- thomasfoster96 11y agoProbably not, but I wouldn't really know. As I understand, device manufacturers (Nokia, Samsung, Motorola, Intel, etc.) and Khronos were keen on WebCL (and presumably OpenCL), but browser makers such as Mozilla (and presumably Google and Microsoft) weren't, so WebCL is pretty doomed.
- greggman 11y agoI've never programmed OpenCL but I've heard from others it's way too device dependent. Lots of queries about what the hardware can do and what form the data needs to be in before you can use it. That's not a good model for something that's just supposed to work everywhere. For the most part that's not true with WebGL. Except for compressed texture formats (for which there was no viable solution at the time) most things just work everywhere except for speed and resources limits and that's already an issue with CPU only web apps
- thomasfoster96 11y agoYeah from having a look at Mozilla's reasons for not implementing WebCL it seems that implementing it just for Firefox OS was hard enough, let alone across all platforms. It seems WebGL 2.0 is their solution, not a separate WebCL standard (although WebCL is now at least 18 months old, while WebGL isn't finished). That said, Nokia and Samsung seem to have already implemented WebCL as a Node.js package.
- rys 11y agoSPIR-V is an IR and isn't designed to be human writable, so you still need a higher level language, like OpenCL, to emit it. If browsers had a standard way to consume a language independent IR, although SPIR-V might not be the most suitable of those available, then that would enable the broader idea of language agnosticism that you suggest.
- fulafel 11y agoWebCL looks pretty doomed since OpenCL is de facto abandoned by nearly all vendors including its initial main proponent (Apple). WebGL 2 should enable some GPGPU stuff eventually though through features like transform feedback and more flexible data shuffling methods/formats.