Fast StringReader for .NET(sorn.net)

submitted by jaavaagurujaavaaguru(260) 4 years, 6 months ago

After some experimentation, this is the fastest way I've found to split a string that represents a multi-line text file into individual lines. Still not as fast as doing it in C, but faster than StringReader or String.Split.

3 comments |category: |Views: 105

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by bladefistbladefist(471) 4 years, 6 months ago 0

so since his code isnt that much faster, he made it do it tons of times so that it would eventually appear to make a difference. blah whatever.

Reply

posted by milicanmilican(0) 4 years, 6 months ago 0

One thousand times is not that out of the ordinary for reading a file full of strings. In addition, a 20 - 30% increase is pretty good. We are reading files with 80,000 plus lines...

JOhn

Reply

posted by bladefistbladefist(471) 4 years, 6 months ago 0

20% increase with 1/3 the features of the .net/mono. This is only useful in special scanrios when you know absolutely the format of the file will be the same everytime.

Reply

information Login or create an account to comment on this story