Click here to Skip to main content
Licence 
First Posted 29 Jul 2005
Views 39,710
Bookmarked 15 times

Bulk String Comparison - Time Involved

By | 1 Aug 2005 | Article
Bulk string comparison - time involved.

Bulk String Comparison - Time Involved

Introduction

Ever tried comparing strings for about 1,000,000,000 times? Try it. Then escape the string comparison checks and then try just the 'for' loop for those many iterations. This tool does just this. The time consumption figures are mind blowing.

Requirements

.NET 1.1

Usage

  1. Enter strings you want to compare (irrelevant, just need two strings for time check).
  2. Choose your comparison option, strings can be compared using:
    1. == operator.
    2. String.Compare() method.
    3. Comparing String.GetHashCode().
    4. String.Equals() method.
  3. Enter number of iterations (times you want to do the comparisons).
  4. Hit compare.
  5. See results for various iterations.
  6. Observe when the results follow a linear pattern.

History

First release 1.0: 28 July 05.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

ameya gholap

Web Developer

India India

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionFinally What is ur Conclusion? PinmemberSreekesh NK10:15 11 Apr '07  
Generalstring.Text Pinmemberksgopal4:26 12 Jan '07  
GeneralString.Equals comparison Pinmemberiammudman6:39 29 Jul '05  
GeneralRe: String.Equals comparison PinmemberS. Senthil Kumar7:21 29 Jul '05  
GeneralRe: String.Equals comparison PinmemberDaniel Turini7:28 29 Jul '05  
GeneralRe: String.Equals comparison Pinmemberameya gholap0:22 1 Aug '05  
GeneralRe: String.Equals comparison PinmemberDaniel Turini1:24 1 Aug '05  
General[Message Deleted] Pinmemberameya gholap18:06 1 Aug '05  
GeneralRe: String.Equals comparison Pinmemberameya gholap21:03 1 Aug '05  
GeneralRe: String.Equals comparison Pinmemberameya gholap18:32 31 Jul '05  
GeneralRe: String.Equals comparison Pinmemberreinux18:47 31 Jul '05  
GeneralRe: String.Equals comparison Pinmemberbetternames6:44 19 Nov '06  
QuestionWhat am I supposed to notice? Pinmemberreinux2:01 29 Jul '05  
AnswerRe: What am I supposed to notice? Pinmemberameya gholap18:37 31 Jul '05  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120517.1 | Last Updated 1 Aug 2005
Article Copyright 2005 by ameya gholap
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid