Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - .NET speed question
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

.NET speed question

 Post Reply Post Reply Page  <12
Author
Bluefrog View Drop Down
Senior Member
Senior Member


Joined: 23 October 2002
Location: Korea, South
Status: Offline
Points: 1701
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bluefrog Quote  Post ReplyReply Direct Link To This Post Posted: 18 January 2004 at 1:14am
This is one article that has several issues covered:

http://www.fawcette.com/vsm/2002_08/magazine/features/bale na/default.aspx
 
The title is Speed Up Your VB.NET Code

It also covers the StringBuilder method along with the reasons.

Thanks Michael. I'll read up on that MSDN article.

P.S. There seems to be a lot of link spamming happening in the forums lately...



Edited by Bluefrog
Back to Top
bazbaz View Drop Down
Newbie
Newbie


Joined: 18 January 2004
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote bazbaz Quote  Post ReplyReply Direct Link To This Post Posted: 23 January 2004 at 5:34pm

using string concatenation was an error either in VB6. There was a pattern to use mid function to obtain a class similar to .NET stringbuilder.

My tests reported 40% better performance with this patter instead of string concatenation.

 

Originally posted by Bluefrog Bluefrog wrote:

Does anyone know of a resource that tells the relative speed of comparable functions (and classes) in .NET.

e.g. The stringbuilder class is MUCH faster than string1 & string2.

I'm wondering about how fast some of the functions and classes actually execute.

e.g. Select Case vs. If Then and arrays vs. collections, etc. etc. etc.

Back to Top
Bluefrog View Drop Down
Senior Member
Senior Member


Joined: 23 October 2002
Location: Korea, South
Status: Offline
Points: 1701
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bluefrog Quote  Post ReplyReply Direct Link To This Post Posted: 23 January 2004 at 11:11pm
Originally posted by bazbaz bazbaz wrote:

My tests reported 40% better performance with this patter instead of string concatenation.

It really depends on what you are doing with the StringBuilder. In one small app processing a small file, I sped it up by over 200x by changing to StringBuilder.

In another instance, the stringbuilder could do it, but string concatenation simply could not do it at all, at least before my patience ran out. There I was working with strings a few MB in size.

I know that if I were using larger files, the speed difference would be larger. So obviously we aren't dealing with a strictly static performance improvement. It would be nice to know the equation that would tell us exactly what the performance improvement 'curve' is.

 

Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.