Hi, I’ve been trying to use JavaScriptCore as an embedded scripting language for a video game engine. (Note: I am just using JSCore, not WebKit.) 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, JSCore is magnitudes 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. Thanks, Eric _______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev