# [Bf-committers] optimising the code

**Jean-Luc Peurière
**
bf-committers@blender.org

*Sat, 29 May 2004 18:34:43 +0200*

Le 29 mai 04, à 17:42, Stephen Swaney a écrit :
>* Pardon my numerical ignorance, but are float arithmetic
*>* operations faster than doubles?
*>*
*>* Most modern computers have some sort of hardware
*>* floating point unit for doing double precision math.
*
It's more a matter of not mixing double and floats, because
casts are costly (processor pipeline flush).
Blender structures use floats, so you must do float math
when possible, which was the case before 2000 but is
no more. Or switch all structures to use only doubles.
Besides, SSE and Altivec code is float not double so if we
either use those, that's the right road.
--
Jean-luc