On Sat, 16 Dec 2006, Hans-Christoph Steiner wrote:
On Dec 16, 2006, at 12:18 PM, chris clepper wrote:
The 64 bit buzzword refers to memory addressing; double precision floats are different than 64 bit CPUs or applications. FPUs have used 64 bit floats for years regardless of their addressing capabilities.
So does that mean it would be possible to make Pd use 64-bit floats on all CPUs without a major performance hit?

No, it's only possible to use 32-bit floats because the t_atom structure contains a t_word union, which is often assumed to be the same size as a C pointer; so in 32-bit mode you can only put a 32-bit float in a t_word.

If you put a double in t_word, then it becomes 8 bytes, so a t_atom depends 12 or 16 bytes depending on whether t_atomtype gets extended to the same size as the t_word. If it's 12 bytes you may get a slowdown due to non-alignment, and in both cases you have a slowdown because it's more RAM.

If t_atom were an opaque type, I know how to make it support 63-bit floats, as well as all the other possible atoms, all in a 8-byte (64-bit) structure, in both 32-bit and 64-bit mode. Note that I really mean 63-bit floats here, and not 64-bit. (The same trick could be applied to shrinking t_atom to 4 bytes in 32-bit mode if using 31-bit floats.)

 _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada
_______________________________________________
PD-dev mailing list
PD-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev

Reply via email to