Now that I am using two computers (laptop and desktop) I find myself needing to sync files between both computers. So I was using VBExpress beta2 to create a file sync utility for my self when I stumbled across this little tidbit under the Widbey documentation.
quote:Most Efficient Data Types For variables that never contain fractions, the integral data types are more efficient than the nonintegral types. In Visual Basic, Integer and UInteger are the most efficient numeric types.
For fractional numbers, Double is the most efficient data type, because the processors on current platforms perform floating-point operations in double precision. However, operations with Double are not as fast as with the integral types such as Integer.
This is interesting to me because I am a directx programmer and as any managed directx programmer knows is that all the data types and classes etc in the managed directx sdk use the Single data type, not the Double data type!!! Maybe someone should contact Tom miller about this??
It doesn't make any sense that a Double data type would be faster than Single. A speed test between single and double data types might be interesting to see.
I have written a speed test app but I don't think it works. It seems ot do wierd things like not adding two integers together. For example the total time it took to process the loop is stored in an array. The test runs the loop 5 times so the array contains 5 numbers. The app is then suppoed to add all the numbers in the array to get the total time it took to run the test. If you run the test repeatedly say 5 times you should see what I mean. Sometimes the numbers are added together as expected and sometimes there not. Strange.
Another minimal test all I made that I know does work puts the single data type as being faster then the double data type most of the time. I say most of the time because sometimes it returns the oposite.
The code and executable is provided in any case...