With integers, an integer type is often required, the size of which is the size of the native word of the platform: this has performance advantages, as well as advantages for low-level interaction with other parts of the system that use the word size.
With floating point values โโthis is not the case. Even on 32-bit systems, double precision floating point (Go float64 ) is usually much more common and, as a rule, no slower than single point ( float32 ). Single-precision floating-point arithmetic is relatively unusual and is generally only useful when memory usage or I / O speed is much more important.
So, although you write that float "will be equivalent to float32 or float64 depending on [your] system architecture," I'm not sure which architecture, in your opinion, should be equivalent to float32 .
ruakh
source share