摘要
由于JavaScript具有跨平台性和免安装、轻量级等优点,已经实现线性代数、无约束优化、信号处理等数学计算,其在未来的"瘦客户端"领域会有很大的应用空间。分析了JavaScript和MATLAB的数值数据类型特点,对比测试了两种语言在不同迭代次数情况下、不同计算机上执行的计算结果差异,并根据测试得出结论:JavaScript比MATLAB的迭代计算结果更加精确,运行速度也更快;MATLAB的计算结果几乎不受计算机配置影响,而JavaScript的运行情况容易受计算机配置影响,这是因为浏览器的运行受到了计算机内存等的影响。
Because JavaScript has the advantages of cross-platform, installation-free and lightweight, the mathematical computation such as linear algebra, unconstrained optimization, signal processing etc. has been realized by it, and it will have a lot of application space in the future of "thin client" field. The characteristics of JavaScript and MATLAB numeric data types are analyzed in this paper. Comparison test of the two different languages is made by the computational results performed in different times of iteration, and on different computers. The test results show that JavaScript iterative calculation results are more accurate than MATLAB, and the running speed is also faster; The result of MATLAB is almost not affected by the configuration of the computer, but the operation of JavaScript is easy to be affected by the configuration of the computer, because the browser's operation is affected by the computer memory etc.
作者
庞聪
杜瑞林
王磊
贺克锋
龙坤
罗棋
Pang Cong Du Ruilin Wang Lei He Kefeng Long Kun Luo Qi(Institute of Seismology, CEA, Wuhan, Hubei 430071, China Wuhan University, School of economics and management)
出处
《计算机时代》
2016年第10期5-7,共3页
Computer Era