浏览器JavaScript是否允许SIMD或矢量化操作? [英] Does browser JavaScript allow for SIMD or Vectorized operations?

查看:246
本文介绍了浏览器JavaScript是否允许SIMD或矢量化操作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用JavaScript编写需要大量数值计算的应用程序。但是,我对客户端JavaScript中有效的线性代数式计算的状态非常困惑。似乎有很多方法,但没有明确表明他们的准备情况。他们中的大多数似乎都限制了允许计算的向量和矩阵的大小。

I want to write applications in JavaScript that require a large amount of numerical computation. However, I'm very confused about the state of efficient linear-algebra-like computation in client-side JavaScript. There seems to be many approaches, but no clear indication of their readiness. Most of them seem to have restrictions of the size of vectors and matrices allowed for computation.

显然允许在GPU上进行矢量和矩阵计算,但我不清楚其局限性。 未经尝试 这个库周围的包装器似乎限制了矩阵和向量的大小。这是一个实际的限制(浏览器不支持其他任何东西)或只是开发限制(有人需要编写代码)?

Obviously allows for vector and matrix computations on the GPU, but I'm not clear on the limitations. Attempted wrappers around this library seem to limit size of matrices and vectors. Is this a practical limitation (browsers don't support anything else) or just a development limitation (someone need to write the code)?

WebCL 是OpenCL的浏览器级实现,但是似乎停留在开发中

WebCL is a proposed browser-level implementation of OpenCL, but appears to be stuck in development.

Apple最近提出了一种替代WebCL的方法,名为 WebGPU 。到目前为止,有一个原型和演示,但我不清楚这是否会被广泛采用。

Apple has recently put forth an alternative to WebCL called WebGPU. So far, there is a prototype and demos, but it's not clear to me if this will see wide adoption.

Mozilla已为SIMD推出API操作,但它只有实验支持。

Mozilla has put out an API for SIMD operations, but it only has experimental support.

JavaScript支持浏览器端的矢量化计算吗?

注意:


  • 我的问题不是用于JavaScript中数值计算的好库,而是JavaScrpt中的矢量化操作是否可行?一个可接受的答案将链接到在非实验性浏览器中工作的矢量化计算的演示。

  • My question is not "What's a good library for numerical computation in JavaScript" but "Are vectorized operations possible in JavaScrpt?" An acceptable answer would link to a demo of vectorized computation working in a non-experimental browser.

我可能会对SIMD,矢量化和GPU计算感到困惑。我认为在这种情况下可以同义地使用它们,因为它们都允许通过使用专门的计算机硬件进行涉及高维向量的高效计算。

I may be getting SIMD, vectorization and GPU computation confused. I thought it was okay to use them synonymously in this context, given that they all allow for efficient computations involving high-dimensional vectors by using specialized computer hardware.

推荐答案

SIMD.js 是JavaScript的一部分。 Firefox和Chrome中也有实验性实现,但现在 SIMD .js 已经从TC39的主动开发中删除,并从第3阶段中删除。它不再被Web浏览器用于实现。在 WebAssembly 中正在积极开发面向Web的SIMD操作,其操作基于SIMD.js操作。

SIMD.js was part of JavaScript. There was also experimental implementations in Firefox and Chrome but now SIMD.js has been taken out of active development in TC39 and removed from Stage 3. It is not being pursued by web browsers for implementation anymore. SIMD operations exposed to the web are under active development within WebAssembly, with operations based on the SIMD.js operations.

WebAssembly SIMD状态

WebAssembly SIMD Status

  • Chrome : In Development
  • Firefox : No public signals
  • Edge : In Development
  • Safari : No public signals

这篇关于浏览器JavaScript是否允许SIMD或矢量化操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆