#DOCUMENTATION by exept
class: Integer
class: Integer class
comment/format in: #hasSharedInstances
--- a/Integer.st Sun Dec 01 16:11:33 2019 +0100
+++ b/Integer.st Sun Dec 01 16:11:41 2019 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1988 by Claus Gittinger
All Rights Reserved
@@ -1216,14 +1218,12 @@
!Integer class methodsFor:'queries'!
hasSharedInstances
- "return true if this class has shared instances, that is, instances
- with the same value are identical.
+ "return true if this class can share instances when stored binary,
+ that is, instances with the same value can be stored by reference.
Although not always shared (LargeIntegers), these should be treated
so, to be independent of the number of bits in a SmallInt"
^ true
-
-
!
isAbstract
@@ -4117,7 +4117,7 @@
^ fibUsingDict value:self
"the running time is mostly dictated by the LargeInteger multiplication performance...
- (therefore, we get O(n²) execution times, even for a linear number of multiplications)
+ (therefore, we get O(n²) execution times, even for a linear number of multiplications)
Time millisecondsToRun:[50000 fib_iterative] 312 (DUO 1.7Ghz CPU)
Time millisecondsToRun:[50000 fib_helper] 109