| Introduction This benchmark compares four different server-side methods (VBScript, JScript, Regular Expressions and the Dictionary Object) for taking a variable length, comma delimited string and converting it into a string with unique values. Basically, removing the duplicate items. Its pretty basic, but it does show VBScript's superior string handling capabilities (one of its very few benefits over JScript, see www.dagz.net/theone/). Also provided is a benchmark for comparing client-side VBScript and JavaScript. Average Test and Results (Server Side)Testing against: 1000 items| Method | String | Time in ms |
|---|
| JS Array: | SomeClientName,Protocol,Newsgroups,Newsgroup,client | 40 | | VBS Array: | SomeClientName,Protocol,Newsgroups,Newsgroup,client | 30 | | RegExp: | SomeClientName,Protocol,Newsgroups,Newsgroup,client | 100 | | Dict Object: | SomeClientName,Protocol,Newsgroups,Newsgroup,client | 40 | Testing against: 5000 items| Method | String | Time in ms |
|---|
| JS Array: | SomeClientName,Protocol,Newsgroups,Newsgroup,client | 230 | | VBS Array: | SomeClientName,Protocol,Newsgroups,Newsgroup,client | 90 | | RegExp: | SomeClientName,Protocol,Newsgroups,Newsgroup,client | 351 | | Dict Object: | SomeClientName,Protocol,Newsgroups,Newsgroup,client | 170 | Source Code Timer Machine specs: - 333 MHz processor
- 327MB RAM
- W2K Server; (Build 2195) SP2
- IIS 5.0
- IE 5.0
Test and Results (Client Side) | 1000, Highest and Lowest Scores not
counted. | | Method | Average | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|
| JavaScript | 42 | 40 | 40 | 40 | 40 | 40 | 40 | 50 | 50 | 50 | 40 |
|---|
| VBScript | 27 (55%) | 30 | 30 | 20 | 30 | 30 | 31 | 30 | 20 | 20 | 30 |
|---|
| 5000, Highest and Lowest Scores not
counted. | | Method | Average | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|
| JavaScript | 199 | 190 | 200 | 200 | 190 | 201 | 201 | 200 | 200 | 200 | 201 |
|---|
| VBScript | 162 (22%) | 151 | 140 | 161 | 160 | 170 | 170 | 150 | 181 | 170 | 170 |
|---|
| 10000, Highest and Lowest Scores not
counted. | | Method | Average | 1 | 2 | 3 | 4 | 5 |
|---|
| JavaScript | 394 | 391 | 391 | 401 | 390 | 401 |
|---|
| VBScript | 367 (7%) | 361 | 361 | 370 | 371 | 381 |
|---|
| 25000, Highest and Lowest Scores not
counted. | | Method | Once |
|---|
| JavaScript | 1002 (53%) |
|---|
| VBScript | 1532 |
|---|
Source Code Machine specs: - AMD 1000mhz CPU
- 512 MB RAM
- W2K Pro; (build 2195) SP2
- IE 5.5
Credits This has been made possible for you courtesy of:
Robert Chartier (rob@aspfree.com) Helferty, Richard (Richardhelferty@FIRSTUSA.com) Michael J. Ryan (tracker1@theroughnecks.com) Philip Obbard (PObbard@slimfast.com)
|