4 ms·
> In this day and age, having that limit there is simply premature optimization. You say this with certainty. Do you know of studies of real-world programs whe
by vinkelhake 13y ago
> In this day and age, having that limit there is simply premature optimization.
You say this with certainty. Do you know of studies of real-world programs where machine-sized integers were replaced whole-sale with bignums?
- stouset 13y agoAll Ruby code does this. Mathematics can still be performant because of tagged pointers. If the MSB is set, the value is a Ruby object. If it's not set, the value should be considered a native data type.
- vinkelhake 13y agoPerhaps I should have been more specific. I know that there are languages that have this property. My question is if there are studies on the performance impact. Preferably in a language that is suitable for high-performance applications (like games).
- mcherm 13y agoThe python example is good here, because originally the Python language had separate types for unbounded-integer and machine-sized-int. This happened as part of the move from Python 2.x to Python 3.x, right along with changing strings from byte-arrays to unicode.[1] There has been lots of fuss and even pushback about the change to use unicode instead of byte arrays, but I have never heard anyone complain about semantics OR performance of the switch to a single integer type. [1] - http://www.python.org/dev/peps/pep-0237/ http://www.python.org/dev/peps/pep-0237/
- acdha 13y agoEverything written in Python has the automatic promotion from C longs to bignums when the result no longer fits: see http://docs.python.org/2/library/stdtypes.html#numeric-types-int-float-long-complex http://docs.python.org/2/library/stdtypes.html#numeric-types...