3 ms·
That's not a terribly difficult proposition in a strongly-typed language -- in fact, it is even more performant than if you were to do it with tagged unions! T
by jwise0 12y ago
That's not a terribly difficult proposition in a strongly-typed language -- in fact, it is even more performant than if you were to do it with tagged unions! The function "floatFromBits : float -> bits" has no execution overhead, and simply adds a type annotation to the semantic meaning of the identity. At execution time, there are no instructions emitted for it...
So, thanks for the well wishes, but in this case I don't think they're needed: any reasonable compiler should be able to do this without great difficulty.