This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
排序算法 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://my.oschina.net/yushulx/blog/1927717 | |
提高nodejs性能的方法有两种 | |
1.通过node-gyp来编译一个Node.js C/C++扩展。2.把C/C++代码编译成WebAssembly | |
WebAssembly | |
是跨平台的,使用与前端,如果对性能要求不太高的情况下,也可以用于后端 | |
耗时是c++的1-7倍,在不和js数据通信的情况下耗时接近于C | |
AS本质上是静态的字节码语言,可以和jvm比较,理论上AS的性能可以追上java,并且由于AS使用的是基本特性,没有java的复杂,速度超过java也是有可能的 | |
也就是js兼容了静态语言和脚本语言的优点 | |
typescript转webassembly更加方便,所以未来typescript是主流趋势 | |
Node扩展 |