Giter Site home page Giter Site logo

Comments (1)

Becavalier avatar Becavalier commented on July 29, 2024

@kungfuboy 你好,TS 本身对性能没有什么提升,如果有需要并且在确定兼容性可以接受的情况下是可以替换成 Wasm 的。如果确定是纯计算的逻辑很多,那么转成 Wasm 肯定性能是会有大幅度提升的。如果重写难度不大可以考虑用 C++ 或者 Rust 重写。C++ 的话走 Emscripten 可以同时降级到 ASM.js,而 Go 的话由于胶水代码体积还是很大,目前不太建议。AssemblyScript 可以试试看,有没有 BUG 只能回归测试看一下了,覆盖率高的话也是可以用的。总体看你的能力和精力平衡选择,毕竟用 C++/Rust 重写需要考虑很多问题,不是很熟练的话也很容易出现 OOM 或者内容泄露的问题。

from book-diso-webassembly.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.