In one test with 10 trials, the Integer calculations took 0.60 seconds and the Long calculations took 0.50 seconds.
When compiled and running 200 trials, the executable took about 0.68 seconds for the Integer calculations and 0.44 seconds for the Long calculations.
When compiled with all advanced optimizations (Project\Properties\Compile\Advanced Optimizations) and running 200 trials, the executable took about 0.55 seconds for the Integer calculations and 0.38 seconds for the Long calculations.
The morale: using a data type that is natural for your computer will produce faster results. On most systems, that will be Longs rather than Integers.
|