Re: slow reading of eventlog
From: Dominique Vandensteen (domi.vds_insert_at_tralala_tenforce.com)
Date: 04/26/04
- Next message: EricJ: "Re: Web.config file"
- Previous message: matt: "IP address Change"
- In reply to: Cor Ligthert: "Re: slow reading of eventlog"
- Next in thread: Cor Ligthert: "Re: slow reading of eventlog"
- Reply: Cor Ligthert: "Re: slow reading of eventlog"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 26 Apr 2004 13:51:08 +0200
wellwell
a post of me long time ago:
after the very small & vs string.format discussion I did some speed tests...
loop of 1.000.000 concatenations of 5 public string variables in a class
gave following results:
result = a & b & c & d & e
+/- 420ms
result = a
result &= b
result &= c
result &= d
result &= e
+/- 370ms
dim result as new StringBuilder()
result.Append(a)
result.Append(b)
result.Append(c)
result.Append(d)
result.Append(e)
new StringBuilder in each loop: +/- 730ms
new StringBuilder outside + result.length=0 in each loop: +/- 690ms
result = String.Format("{0}{1}{2}{3}{4}", a, b, c, d, e)
+/- 1540ms
so in my opinion, only use string.format to do real formatting :-)
the difference between the first 2 seems strange to me
is this a compiler problem?
oh yes, everything was ran in debug mode in visual studio 2003...
dominique
- Next message: EricJ: "Re: Web.config file"
- Previous message: matt: "IP address Change"
- In reply to: Cor Ligthert: "Re: slow reading of eventlog"
- Next in thread: Cor Ligthert: "Re: slow reading of eventlog"
- Reply: Cor Ligthert: "Re: slow reading of eventlog"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|