cbx |
Posted - Jun 18 2005 : 03:01:41 AM 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??
Here is the link to the documentation...
http://whidbey.msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vbalr/html/28f5e4ba-ec24-4f37-b90a-e8ee822f778a.asp |
cbx |
Posted - Jun 18 2005 : 5:44:25 PM 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...
VB.NET 2002 .net 1.0 Download Attachment: SingleDoubleSpeedTest.zip 8.69 KB |
Eric Coleman |
Posted - Jun 18 2005 : 11:51:33 AM 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. |
|
|