Alex Rivera | Logout

Are doubles faster than floats in C#?

Asked 2008-10-01T17:58:46.337
56

I'm writing an application which reads large arrays of floats and performs some simple operations with them. I'm using floats, because I thought it'd be faster than doubles, but after doing some research I've found that there's some confusion about this topic. Can anyone elaborate on this?

Edit
Report

1 Answer

8

I'm writing a ray tracer, and replacing the floats with doubles for my Color class gives me a 5% speedup. Replacing the Vectors floats with doubles is another 5% faster! Pretty cool :)

That's with a Core i7 920

answered 2009-06-26T12:21:07.767

Your Answer