Repository navigation
Replies: 3 comments
|
This was improved a bit in 7.0.281 but overall JavaScript is DEEPLY problematic in terms of performance due to many limitations most of which are its restricted type system. E.g. long isn't a type that's available in JavaScript and we end up with a rather complex hack to get it working. In a recent optimization we treat numbers differently based on their size but this means branching on every operation. If you have specific benchmark code that performs poorly then post it. It might be a small change you can do that would boost performance significantly or might be something we can improve. We're considering an ASM version of the JavaScript port too, but I'm not sure if that would give us the desired performance boost. |
|
I did a little research and I'm shocked to find that there's no good metering framework for javascript -- and anyway, if it existed // microsecond samples (windows) // microsecond samples (javascript) The most interesting thing here is that "random move" went from rough parity with make-move to being 2.5x This mode of metering (and some variants) would be easy to insert into the code generation - basically requires |
|
If you include the Java code of the random move it might be something we can help you with. Random sounds like a problematic operation that would hit the edge cases of our numeric limits repeatedly. I'm guessing you shift and roll numbers which would trigger MSB changes to |
Uh oh!
There was an error while loading. Please reload this page.
I meter cpu oriented performance to tune the behavior of my game playing robots. My rough measurement of
performance rates a regular desktop app at 1.3 standard cpus. Android and IOS apps rate 0.3-0.4 standard CPUs.
Javascript apps (on a standard desktop) 0.3-0.4 standard cpus.
This seemed like good news, but actual measurement of robots put their performance about 50x worse.
That's a pretty big gap, so clearly my rough measure isn't working for this case.
(1) from first principles and general familiarity with how the javascript code is structured, what is
the likely reason for the difference?
(2) how can I get actual data instead of guesses.
All reactions