ShortArray, DoubleArray & influence of 64bit
I copy the comment of Behavior>>instSpec
I had missed this one, thanks!
It depends.
ByteArray is a good name and ShortArray is good name, self-explanatory, there is no discussion here.
Then it depends, at some place we use WordArray and DoubleWordArray, in other we use LongArray and SixtyFourBitsIndexableArray... I'd go for WordArray and DoubleWordArray, but I don't mind if one decides otherwise.
For Float, we changed the representation to be "SmallFloat64" and "BoxedFloat64". We have no proper support for single precision float in Pharo. We could consider renaming FloatArray to DoubleArray, Float64Array, or something similar. I don't know.
I am still confused with WordArray in Pharo terminology: 32bit or native register size? For the naming I like the Java convention: byte(8), short(16), int(32), long(64). Ideally that would make: ByteArray(8), ShortArray(16), IntegerArray(32), LongArray(64), WordArray(native), DoubleWordArray(native*2) As for floats, one arithmetic on 64bit double is fine, but I think we need both 32bit & 64bit loads/stores, that is having FloatArray(32) and DoubleArray(64). That would make UFFI code consistent among 32bit & 64bit machines . Also in x86 all architectures do IEEE 64bit double arithmetic, so no need for a "native" register size. Thibault
participants (1)
-
Thibault Raffaillac