Re: [Pyobjc-dev] NSDecimalNumber to the next level
Brought to you by:
ronaldoussoren
From: b.bum <bb...@ma...> - 2004-03-10 19:26:10
|
On Mar 10, 2004, at 11:08 AM, Pierce T.Wetter III wrote: > How so? NSNumbers are still an object, and I think that NSDecimal > actually only uses the minimum amount of memory necessary. > > Remember this would only be necessary when passing a python number > back to objective c. NSNumber & NSValue are designed as a minimal encapsulation of a C scalar type. NSDecimalNumber can represent any number that can be expressed as mantissa x 10 exponent where mantissa is a decimal integer up to 38 digits long, and exponent is an integer between -128 and 127. Though, given that this will only come into play when passing a python number back to Obj-C, the performance penalty will be a lot smaller.... |