Giter Club home page Giter Club logo

Comments (6)

chexiongsheng avatar chexiongsheng commented on June 15, 2024 1

有些系统应用是没有权限jit的,比如ios。
wasm没有jit的情况,快不了多少,js调用c++肯定比调用wasm好。
我所知道一个act游戏用了puerts,战斗部分都用了ts,整体代码70%的占比,没什么性能问题,甚至关了jit,帧率也没降低。我觉得关键在于设计,设计不好会慢(另外一个反面是一个lua项目,在lua那算碰撞)。

from puerts.

chexiongsheng avatar chexiongsheng commented on June 15, 2024

wasm是v8内置的支持,按v8使用文档使用即可

from puerts.

hewenning avatar hewenning commented on June 15, 2024

Puerts 的 JIT 是可以使用的么,我们现在大部分业务逻辑都是 js 写的,想降低下 Game 线程的执行时间,目前其他优化点不多了,想从脚本层入手去做一些优化,不知道您这边有什么推荐的方案么?我看了下 wasm,对于虚幻引擎宿主来讲,是不是 js 直接调用 C++ 比 wasm 会更好些?您这边有什么相关的基于 Puerts 的脚本层加速方案可以参考么?

from puerts.

hewenning avatar hewenning commented on June 15, 2024

现在 Puerts 中的 V8 是不是默认开启 JIT 的呀

from puerts.

hewenning avatar hewenning commented on June 15, 2024

我在 JsEnvImpl 中看到这这块代码,这个 WITH_V8_FAST_CALL 如果开启的话是不是函数调用的性能也会更高呢
#if PLATFORM_IOS
char Flags[] = "--jitless --no-expose-wasm";
v8::V8::SetFlagsFromString(Flags, sizeof(Flags));
#endif

#ifdef WITH_V8_FAST_CALL
char FCFlags[] = "--turbo-fast-api-calls";
v8::V8::SetFlagsFromString(FCFlags, sizeof(FCFlags));
#endif

from puerts.

hewenning avatar hewenning commented on June 15, 2024

这个是主要优化 C++ 到 JavaScript 的 API 调用么

from puerts.

Related Issues (20)

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.