开发者

Qt and script system

there are a nice binding of script system for Qt, which uses javascript. With metaobjects built in qt it gives a big power for a programmer.

I'm rewriting game from another libraries with using Qt. Now I want to replace 开发者_高级运维python script system with something faster. I dunno whether built-in Qt scripts are quite fast for my purposes? Or QLua would be better choise for my case?

Any numbers/statistic is appreciated, thanks.


This article on QtScript in 4.6 discusses the improvements in performance in QtScript in 4.6 over 4.5, it states:

Qt 4.6′s QtScript implementation is based on WebKit’s JavaScript engine, JavaScriptCore (you might’ve also heard it being referred to as “SquirrelFish” or “SquirrelFish Extreme”).

Another article discusses the technologies in SquirrelFish Extreme, which include:

  • Bytecode Optimizations
  • Polymorphic Inline Cache
  • Context Threaded JIT
  • Regular Expression JIT

If you need full native code performance, but want to allow the system to be extended, you may want to look into How to Create Qt Plugins, you could even use the Qt plugin system to write plugins that run JavaScript, Lua or Python to extend the system.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜