According to this tool,
https://github.com/mrdoob/stats.js/The JavaScript version
http://jsrun.it/notch/dB1E, runs constantly at 60 fps. I didn't change the resolution, is the original one.
If I change that to 640x400 it runs at 31-33fps. (of course you need to save the website, edit the sources, width and height in css, width and height in canvas and width and height in code, then run in a local server with this script in the console:
javascript:(function(){var script=document.createElement('script');script.onload=function(){var stats=new Stats();document.body.appendChild(stats.dom);requestAnimationFrame(function loop(){stats.update();requestAnimationFrame(loop)});};script.src='//rawgit.com/mrdoob/stats.js/master/build/stats.min.js';document.head.appendChild(script);})()
).
Java version runs at 28-31 fps on my machine. (Latest Java 64 bit).
I have 2 theories:
- Notch is really a good programmer, even in javascript he did the best code?
- JavaScript in Chrome is really faster than FPC and Java?
- I need to try with Java 32 bit?