Application Performance,

  • Thread starter Thread starter Anders Both
  • Start date Start date
A

Anders Both

Does someone knows links to web-pages, or book contatining, information
about the most important things to consider, while trying to make the .NET
code perform faster.

e.g. In my code I make big use of ArrayList and Hashtable, but my code would
be only a little bit more complicated, if using normal Arrays. I feel like a
thing like that maybe could improve performance ?

What are they most important things to consider ?

Best Regards,

Anders, Denmark.
 
Anders Both said:
Does someone knows links to web-pages, or book contatining, information
about the most important things to consider, while trying to make the .NET
code perform faster.

e.g. In my code I make big use of ArrayList and Hashtable, but my code would
be only a little bit more complicated, if using normal Arrays. I feel like a
thing like that maybe could improve performance ?

What are they most important things to consider ?

In my opinion, the most important things to consider are:

1) The readability of the code
2) The correctness of the code
3) The maintainability of the code
4) Does your code perform "well enough"?

For the most part, changing from the collections to arrays will give
you *some* speed improvement, but it may well not give you much, and
may well reduce readability considerably.

If lots of the things you're storing/accessing are value types, you
would save a bit more, as using arrays you wouldn't need to be
boxing/unboxing the whole time.

If you feel your app isn't performing well enough, make sure you know
where the bottleneck is, and focus on improving that bit of code. Use a
profiler or even just rough-and-ready timing to try to find the
bottleneck (profiling will be more reliable, but more expensive).
 
Thx, for the advices until now. I will look into it.

But ofcause the design of the logic, will most often be the one and only
thing to consider.
 
Back
Top