inherit
130228
0
Jul 11, 2024 19:19:59 GMT -8
Charles Stover
1,731
August 2008
gamechief
|
Post by Charles Stover on Jun 3, 2010 23:43:28 GMT -8
I know in PHP ' is faster than " (because PHP doesn't go back and look for characters such as \t or \n when in single quotes), but is the same true in JavaScript? JS parses \t and \n in both single and double, but are there other factors? I hear Firefox parses double quotes slightly faster (because, if using single quotes, it internally converts them to double). Does anyone have any benchmarking on this?
EDIT: Also, x++ versus ++x
|
|
inherit
100824
0
May 13, 2012 5:37:49 GMT -8
Michael
14,585
March 2007
wrighty
|
Post by Michael on Jun 7, 2010 14:04:37 GMT -8
x++ and ++x are different, so you can't really compare them! :/
|
|
inherit
130228
0
Jul 11, 2024 19:19:59 GMT -8
Charles Stover
1,731
August 2008
gamechief
|
Post by Charles Stover on Jun 7, 2010 14:50:24 GMT -8
They are, for the majority of the time, interchangeable. The question is, during those times, which should you use? The answer is benchmarking.
|
|
inherit
16846
0
Nov 19, 2012 15:20:20 GMT -8
Chris
3,036
December 2003
cddude
|
Post by Chris on Jun 7, 2010 17:52:43 GMT -8
Why not benchmark it yourself?
|
|
inherit
130228
0
Jul 11, 2024 19:19:59 GMT -8
Charles Stover
1,731
August 2008
gamechief
|
Post by Charles Stover on Jun 7, 2010 19:42:14 GMT -8
Too lazy to look up benchmarking commands in JavaScript. Plus, don't have that many browsers installed on my computer.
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Jun 7, 2010 19:47:15 GMT -8
just create a REALLY big loop and timestamp it before and after. change what is in the loop to see if there is a huge difference.
|
|
inherit
130228
0
Jul 11, 2024 19:19:59 GMT -8
Charles Stover
1,731
August 2008
gamechief
|
Post by Charles Stover on Jun 7, 2010 20:21:51 GMT -8
I know how to benchmark. =P I still don't have many browsers.
|
|
inherit
134992
0
May 26, 2012 2:38:57 GMT -8
SubDevo
Creator of LSD...
3,861
December 2008
subdevo
|
Post by SubDevo on Jun 8, 2010 2:36:14 GMT -8
geez Charles, just install the extra browsers. Benchmark, then uninstall if you don't want them... lol I keep 5 different browsers installed just for testing purposes.
|
|
#00AF33
14306
0
1
Sept 8, 2023 8:54:17 GMT -8
Jordan
What is truth?
11,838
October 2003
jab2
|
Post by Jordan on Jun 8, 2010 10:41:05 GMT -8
|
|