Björn,
Why not setup a couple of test programs & find out?
For timing .NET 1.x programs I normally use QueryPerformanceCounter:
http://support.microsoft.com/kb/306978/en-us
In .NET 2.0 I normally use the new StopWatch class.
http://msdn2.microsoft.com/en-us/lib...stopwatch.aspx
However!! rather then worry if VB.Trim is faster then String.Trim up front.
I would worry about writing the program first, at least prototype the
program first. Then use either CLR Profiler or another profiling tool to
find the bottlenecks. I would then optimize those bottle necks.
--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
"Björn Dietz" <bj*********@gmx.de> wrote in message
news:dr*************@news.t-online.com...
| Hello,
|
| does someone have experience concerning the performance with string
| operations in .net2?
|
| for example, which code (a or b) is quicker when executed a million times:
|
| a)
| DIM x1 AS STRING = " TEST "
| DIM x2 AS STRING = TRIM(x1)
|
| b)
| DIM x1 AS STRING = " TEST "
| DIM x2 AS STRING = x1.TRIM
|
| I have to parse through very large files, so even a small difference
| would make a significant difference for the final program.
|
| thanks in advance!
|
| bjoern