Which is faster code: Enumeration or Constants?

  • Thread starter Thread starter Shane
  • Start date Start date
S

Shane

I have to do a lot of calculations when leaving certain controls.
Somewhere along the order of 800 to 1000 fields.

I'm considering translating all of the numeric fields that are in a
string collection into a fixed double array. I would use the already
converted doubles in the calculations. I could access the double array
by either constants or by an enumeration. Does anybody know which way
is faster, if any?

The most elegant solution would be to create a new collection of
doubles and use the named entries in my original string collection. I
worry about the slowness of accessing the data using the hash
algorithm in a collection vs. accessing a simple double array.

Shane
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top