[Webkit-unassigned] [Bug 146448] New: JavaScriptCore performance is very bad on Windows

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 29 19:57:02 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=146448

            Bug ID: 146448
           Summary: JavaScriptCore performance is very bad on Windows
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: PC
                OS: Windows 7
            Status: NEW
          Severity: Major
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ewmailing at gmail.com

Created attachment 255809
  --> https://bugs.webkit.org/attachment.cgi?id=255809&action=review
How to build JSCore for Windows

I’ve been trying to use JavaScriptCore as an embedded scripting language for a video game engine. I’ve been using it on multiple platforms. During my testing, I’ve discovered that the JavaScriptCore Windows performance is very slow. I wanted to alert you in hopes there is something that can be done to fix it.


I’ve been getting help on building JavaScriptCore for Windows from a few people in the community. My current build is as of a couple of weeks ago. However, I’ve been seeing the same performance characteristics from a build from a little over a year ago.

To prove to you that this is a problem to just JavaScriptCore on Windows, and not a general Windows problem, nor a problem with my code, I have done the following:

- I ran the program on Windows, OS X, Linux, iOS, Android, and Raspberry Pi (Linux).
- I wrote comparable programs in C and Lua and also ran these on all platforms.
- Additionally, I was able to run on the same hardware (dual boot) for Windows/Linux.

So here is the quick summary:

                   Ubuntu 12.04 LTS (64-bit)                       Windows 8.1 (64-bit)
===========================================================
C                     5600 sprites                                              27000 sprites
Lua                  3100 sprites                                             12000 sprites
JSCore            2400 sprites                                              120 sprites

This was on an Intel Core i5-3570K @ 3.40 GHz with Intel 4000 HD graphics. The reason for the big jump in Windows performance is mostly due to the Intel graphics drivers being poor on Linux. However, that 120 sprites is not a typo. Whereas everything else was faster on Windows in this case, JSCore is a magnitude slower.

My numbers for the other operating systems tend to follow sensible trends. Windows/JSCore is an outlier. And other programs I’ve run also show JavaScriptCore on Windows has performance problems.

You can see this summary with the programs running in a short video I put together and uploaded to YouTube:
https://youtu.be/UDyI1cckDJI



I have uploaded pre-built binaries of my test program. JavaScriptCore is dynamically linked in all cases, so it is easy to swap in another build of JSCore if you want to try things. There is a file called config.txt in each bundle that lets you change the number of sprites. (I did not sign the OS X binaries with my Developer ID because I figured you might want to change the config.txt.) Also, the Lua and JavaScript scripts are in plain text and can be easily modified.


And for clarity: All my test programs here are 64-bit versions. I have not actually benchmarked 32-bit except on ARM devices.


Windows 7 and up (x64) 
Zip:
http://playcontrol.net/tempdownload/WebKit/MinimalSDLSpriteBenchmarkC.zip
http://playcontrol.net/tempdownload/WebKit/MinimalSDLSpriteBenchmarkLua.zip
http://playcontrol.net/tempdownload/WebKit/MinimalSDLSpriteBenchmarkJavaScript.zip
Installer:
http://playcontrol.net/tempdownload/WebKit/MinimalSDLSpriteBenchmarkC-1.0.0-win64.exe
http://playcontrol.net/tempdownload/WebKit/MinimalSDLSpriteBenchmarkLua-1.0.0-win64.exe
http://playcontrol.net/tempdownload/WebKit/MinimalSDLSpriteBenchmarkJavaScript-1.0.0-win64.exe

OS X 10.9 and up
http://playcontrol.net/tempdownload/WebKit/MinimalSDLSpriteBenchmarkC.app.zip
http://playcontrol.net/tempdownload/WebKit/MinimalSDLSpriteBenchmarkLua.app.zip
http://playcontrol.net/tempdownload/WebKit/MinimalSDLSpriteBenchmarkJavaScript.app.zip

Linux (x64 Ubuntu 12.04 LTS a.k.a Steam Runtime)
http://playcontrol.net/tempdownload/WebKit/MinimalSDLSpriteBenchmarkC-0.1.1-Linux.tar.gz
http://playcontrol.net/tempdownload/WebKit/MinimalSDLSpriteBenchmarkLua-0.1.1-Linux.tar.gz
http://playcontrol.net/tempdownload/WebKit/MinimalSDLSpriteBenchmarkJavaScript-0.1.1-Linux.tar.gz



I also made the repos to my programs available:

https://bitbucket.org/blurrr/minimalspritebenchmarkc
https://bitbucket.org/blurrr/minimalspritebenchmarklua
https://bitbucket.org/blurrr/minimalspritebenchmarkjavascript

However, it probably won’t be of much use without my SDK because without it, you’ll need to compile all the dependencies yourself and figure out the build system. If you need a copy of my SDK, let me know. 


I'm also attaching my write up of how to build JavaScriptCore for Windows (64-bit). The existing instructions had problems and with the help of a few in the community, I was able to get through it and the document is what I came up with.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150630/0a7c133c/attachment.html>


More information about the webkit-unassigned mailing list