Are doubles faster than floats in C#?

前端 未结 10 826
[愿得一人]
[愿得一人] 2020-12-02 20:06

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 doubl

10条回答
  •  北海茫月
    2020-12-02 20:41

    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

提交回复
热议问题