Open translunar opened 6 years ago
I'm just revisiting this issue to note that using :object
for integers will (a) speed up compilation, and (b) possibly make it easier for us to support faster element-wise math for float32, float64, and the complex dtypes.
This issue follows from https://github.com/SciRuby/nmatrix/pull/604#discussion_r158081343.
In the past,
guess_dtype()
would take aFixnum
and auto-assign a dtype of:int64
. Now that Fixnum and Bignum are deprecated, anInteger
may contain values that won't fit in:int64
. Before we can release a new version, we need to adjustInteger
to default to:object
instead.The other option (bad) would be to check each and every item in an array for
:int64
overflow before allocating.This raises the following question: do we even still want the
:int64
dtype, or is it better to just use:object
for anything that looks like an integer?