Re: Cleaning data - performance issue

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote
in news:OpbU0XqVGHA.4900@xxxxxxxxxxxxxxxxxxxx:

Another thing here, an internal RegEx object is being created
through
every iteration of the loop. The OP would see much better performance
by creating one RegEx instance and setting the options on it to do a
pre-compile of the expression. The performance would probably
increase dramatically.

Hi guys,

I did as suggested and moved the parsing of chars outside the method itself
and I now pass this as a parameter. Also I have skipped the check on
StringBuilder.Length, since it was basically not needed.

The method now works as intended and memory consumption is moderate.

Thanks for your input.

:o)

--
Jesper Stocholm
http://stocholm.dk
Hvor køber du slik, cola eller smøger online?
Send linket til mig via http://ekiosk.dk
.



Relevant Pages

  • Re: String filtering
    ... Heap means the String objects ... iteration, 10000 chars, 1000 runs. ... Last_Indexloop ...
    (comp.lang.ada)
  • Yow! LOOP macros are LOOPY!
    ... By relying entirely on procedure calls to express iteration, ... to but cleaner than C's FOR loop. ... other macros going around at the time other than MacLisp's ... (bind (vi (vector-ref v i))) ...
    (comp.lang.scheme)
  • Re: Polling, Interrupts, DMA, Synchronous, Asynchronous I/O Definitions
    ... the terminology is less useful than it might be. ... though a "message loop" could arguably be claimed to be ... considering in a particular iteration but what is true for _ALL_ ... watching the "polling" version eating up every single CPU cycle ...
    (alt.lang.asm)
  • Re: Histogram of character frequencies
    ... generated object code may simply be a loop in which elements are ... believe any C compiler anywhere would reject it. ... On the first iteration of the loop you test the end of file indicator ...
    (comp.lang.c)
  • Re: LOOP blows!
    ... There are two `initializations' in execution of LOOP, ... before staring the first iteration. ... |> The first for clause will never terminate. ...
    (comp.lang.lisp)