Will V8 optimize event sheets?

0 favourites
  • 4 posts
  • I took a look at the compiled exported game to see what event sheet is turned to. I expected it to create a javascript code out of it, but it seems like it creates some kind of a data list of instructions instead, which will be, probably, executed on some kind of ConstructVM. In this case none of the optimizations that V8 or SpiderMonkey can offer are applied, i.e. event sheets run on an ancient JS interpreter speed, or even slower.

    Is it true? Please tell me I am wrong...

    If no, what is the actual process?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • No, Construct 2 takes advantage of the speed of the newest JS interpreters. I think you just exported your game with the minify option checked.

  • Javascript engines like V8 optimise the event engine (the code that runs all the events). Modern JS engines are very well optimised and all of them compile to machine code, so it's pretty fast.

  • [quote:kpibzfmx]Javascript engines like V8 optimise the event engine

    Right, it means that Event Engine is compiled to machine code. But what about the event sheet? Does Event Engine interprets the event sheet?

    I mean, even early JS engines were written in very fast C++, but what they did (the interpretation of javascript) was very slow.

    The same thing here: Event Engine is very fast, but what it does (the interpretation of event sheet) is at the speed of "interpretation".

    For example, if I have a loop in event sheet and I use a global variable "foo" of type "number" there, will this variable infer type, like Javascript does or it will stay "dynamic any type var"?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)