I am loading a huge dataset into memory. The code basically loops through a DataTable and copies values from a DataRow into int
variables. For some reason, the variables that I declare inside the loop process almost twice as fast than those that are declared at the top of the method.
Below is the screenshot from Ants Perf Profiler. As you can, line siteID = (int) oDR[FIELD_SITE_ID]
is almost twice as slow as the previous line. Why would that be?