You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have proper support for Float, Double, Int64 and Word64 (the other IntN/WordN types too, but those can be reasonably well simulated).
As far as I can tell, the reason they are currently not supported is that cells in the runtime store their data in a (union the size of a) machine word, so supporting 64 bit values would mean that the data field takes 64 bits even on 32 bit platforms, increasing the needed memory by a factor of 1.5 (unless we come up with a different representation). Other possibilities would be to use a pointer indirection for 64 bit values (but that would be slower) or to somehow store them in 2 cells?
The text was updated successfully, but these errors were encountered:
Yes, it would be nice.
Supporting the 64 bit types on 32 bit platforms could be an option in config.h, with a 50% increase in memory consumption if you opt in.
In general, there are two reasons to want Float over Double on a 64 bit platform:
faster arithmetic
less memory consumption
For MicroHs I don't think the first point makes much of a difference, since there is so much other overhead.
The second point would only make sense if MicroHs had unboxed vectors. Currently, the memory use would be the same for Float and Double. When we get unboxed vectors, I will certainly consider Float support.
It would be nice to have proper support for
Float
,Double
,Int64
andWord64
(the otherIntN
/WordN
types too, but those can be reasonably well simulated).As far as I can tell, the reason they are currently not supported is that cells in the runtime store their data in a (union the size of a) machine word, so supporting 64 bit values would mean that the data field takes 64 bits even on 32 bit platforms, increasing the needed memory by a factor of 1.5 (unless we come up with a different representation). Other possibilities would be to use a pointer indirection for 64 bit values (but that would be slower) or to somehow store them in 2 cells?
The text was updated successfully, but these errors were encountered: