JavaScript tests PMx64 vs FF-Nightly on same machine

Users and developers helping users with technical Pale Moon issues (Windows and other non-Linux O.S.). Please direct questions about the Linux version to the appropriate Linux board.

Moderators: trava90, satrow

Forum rules
This board is for technical/usage questions and troubleshooting for the Pale Moon browser only. The main focus here is on Pale Moon on Windows. Please direct your questions for Linux, Android and Mac to the dedicated boards.
Technical issues and questions not related to the Pale Moon browser should be posted in "technical chat"
Please keep off-topic and general discussion out of this board, thank you!
tomByrer

JavaScript tests PMx64 vs FF-Nightly on same machine

Unread postby tomByrer » Fri, 15 Jun 2012, 20:34

Sorry for the poor formatting; got to run to work soon but wanted to get this out of my hair :) Significant differences in bold.
http://jsperf.com/int2single-char
UserAgent  '' + c  .toString(10)  c + ''  # Tests 
Android 2.1 32,114 14,697 30,392 3
Chrome 19.0.1084 24,619,950 15,609,478 24,728,556 7
Firefox 12.2 9,381,495 1,564,055 6,233,782 4
Firefox 13.0 6,960,516 1,436,629 6,960,516 1
Firefox Beta 16.0a1 6,614,908 1,508,119 6,145,196 5
IE 8.0 304,939 218,148 327,885 3

http://jsperf.com/single-char2int
UserAgent  ~~c  Number(c)  c - 0  hashmap[c]  parseInt(c)  parseInt(c, 10)  switch(c)  # Tests 
Android 2.1 95,124 12,969 42,507 20,951 9,829 10,237 54,374 2
Chrome 19.0.1084 2,687,716 3,383,886 2,012,403 6,260,098 5,092,683 6,118,578 4,914,500 4
Firefox 12.2 2,504,159 2,483,160 2,674,064 260,076 1,565,609 1,451,797 958,737 4
Firefox Beta 16.0a1 3,992,046 3,298,233 3,929,134 265,685 1,657,461 1,500,131 808,795 4
IE 8.0 557,934 284,402 495,481 161,853 284,402 263,116 68,153 3

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 22415
Joined: Sun, 28 Aug 2011, 17:27
Location: 58.5°N 15.5°E
Contact:

Re: JavaScript tests PMx64 vs FF-Nightly on same machine

Unread postby Moonchild » Fri, 15 Jun 2012, 20:52

I'm not entirely sure what your point is for these tests, but you should realize that comparing tight loops in 8-bit address/variable space isn't the best performance comparison for browsers ;) Especially not if you compare 32-bit with 64-bit (your post lacks detailed information about the browsers, and also what the numbers represent).

I'm actually pleasantly surprised about the int -> char conversion results you show, since it's not one of Pale Moon x64's strong points, per se.

Also, you have to realize that these conversions are done mostly in the JIT library, which is for a large part assembly code, by definition difficult to optimize at compile-time (which is where Pale Moon gets most of its strength) and very dependent on the inner workings of the processor it's run on.
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.

"If you want to build a better world for yourself, you have to be willing to build one for everybody." -- Coyote Osborne


Return to “General support”

Who is online

Users browsing this forum: No registered users and 13 guests