2.19 KB, text/html
Created attachment 119586 [details] Testcase comparing local and global variables in loops I'm using this testcase to compare performance. Here's the results on the same computer (Pentium II 300MHz, 364M RAM): Mozilla 1.3: Local: 770ms Global: 2310ms Global not Function: 3960ms MS IE5.5: Local: 880ms Global: 1430ms Global not Function: 2190ms
Note that the testcase may load somewhat slowly initially because it tests globals outside a function when the page loads. Click the test button to test local and global variables in functions.
This is due to DOM security checks on global variables. That is, Mozilla does a security check on every global variable access; IE does not. Reassigning to Security:General to see if this cost can be mitigated in any way, and cc'ing jst -
Actually, this bug is a duplicate of bug 169559. Tim, you will be cc'ed on that one so you can follow progress on this issue - *** This bug has been marked as a duplicate of 169559 ***