JavaScript tests PMx64 vs FF-Nightly on same machine

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
tomByrer

JavaScript tests PMx64 vs FF-Nightly on same machine

Unread post by tomByrer » 2012-06-15, 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: 35600
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

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

Unread post by Moonchild » 2012-06-15, 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.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked