-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Colin, I have great news :)

After more brainstorming, we (mishoo and I) came up with some updates to
my previous test, the most important thing being that we have a new
winner :)

We baked two more methods: String.replaceMap (a sloppy variant of
String.replace), and Prototype.oneDiv2 (a variant of
Prototype.oneDiv which does caches the textNode too).

More updates:
- - change text after each test (adding/changing trailing digits - to
avoid any hypothetical browsers' cache tricks);
- - dropped escaping """ (to play similar to "oneDiv" methods);
- - changed default iterations number to "10000" (to avoid future
confusion).

OK, without further ado, here are the consolidated results:

Benchmarks run using 10000 iterations on these browsers:
A. Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.1) Gecko/20061222
Firefox/2.0.0.1
B. Opera/9.10 (X11; Linux i686; U; en)
C. Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
2.0.50727; FDM)
D. Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.5 (like Gecko)
E. Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)
F. Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/312.8.1
(KHTML, like Gecko) Safari/312.6
G. Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1)
Gecko/20061010 Firefox/2.0

Method execution rate (per second) per browser:
          Method      A      B      C      D      E      F      G
       Prototype   3197  17094   4182   3959   4704   3598   3162
Prototype.oneDiv   2548  16529   5005   4006   5283   5851   1826
Prototype.oneDiv2   8170  51020  13405   8258  10953  13477   6588
  String.replace  15175   6739  15699   4468  15949   1604  10526
String.replaceMap   8905   9699  12804   4008  16584   1694   6540
    String.split  10163  27322   9681   4983  10373   1730   6954

Top method per browser:
          Method      A      B      C      D      E      F      G   AVG
       Prototype      5      3      6      6      6      3      5  4.86
Prototype.oneDiv      6      4      5      5      5      2      6  4.71
Prototype.oneDiv2      4      1      2      1      3      1      3  2.14
  String.replace      1      6      1      3      2      6      1  2.86
String.replaceMap      3      5      3      4      1      5      4  3.57
    String.split      2      2      4      2      4      4      2  2.86

Sorry, I have no Intel based Mac available at this hour, maybe S�bastien
could help us. ;-)

cheers
- --
Marius Feraru
-----BEGIN PGP SIGNATURE-----

iD8DBQFFn6i1tZHp/AYZiNkRAgcuAKDvaLyJrfZ4BvCh/Q5eIaZvSuy1vQCgxfCu
6o4cDXbL6QMgO0GVPJt0vJY=
=abUL
-----END PGP SIGNATURE-----

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on 
Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to