[ENH] IntegerPrintOpt-gk ( [cd][er][et][sm] Work correctly and
faster; Recommend including. )
tomkoenig at mindspring.com
tomkoenig at mindspring.com
Sat Dec 13 04:47:08 CET 2003
Profiled conde with the old and new versions of the method and compared
output of the old and new versions for a variety of values and bases.
See results below
Smalltalk garbageCollect.
TimeProfileBrowser onBlock:
[0 to: 100000 do: [:each | String
streamContents: [:strm | each printOn2: strm base: 6]]]. "old
version of method"
TimeProfileBrowser onBlock:
[0 to: 100000 do: [:each | String
streamContents: [:strm | each printOn: strm base: 6]]]. "new
version of method"
range base old timing new timing
0 to: 100000 9 2813 2360
0 to: 100000 7 2909 2389
0 to: 100000 5 3088 2417
0 to: 100000 3 3632 2589
0 to: 100000 2 4668 2883
-100000 to: 0 9 2547 2445
-100000 to: 0 7 2433 2412
-100000 to: 0 5 2499 2488
-100000 to: 0 2 3092 2905
1073741824 to: 1073841824 2 19472 8495
1073741824 to: 1073841824 9 8335 6831
-1073841825 to: -1073741825 2 19251 9263
-1073841825 to: -1073741825 9 8357 7424
the same range of values and strings matched using the code below.
b_2.
ok_errors_0.
-100000 to: 0 do: [:each |
((String
streamContents: [:strm | each printOn: strm base: b]) =
(String
streamContents: [:strm | each printOn2: strm base: b])) ifFalse:
[errors _ errors + 1] ifTrue: [ok _ ok + 1]
].
Transcript cr;show:errors; show: ' '; show: ok; show: ' for base: ';
show:b.
< I'm a bug-fixing machine! >
This post brought to you by the BugFixArchiveViewer, a handy tool that
makes it easy to comment on proposed fixes and enhancements for Squeak.
For more information, check out the Web page for the BugFixArchiveViewer
project: http://minnow.cc.gatech.edu/squeak/3214
< I'm a bug-fixing machine! >
More information about the Squeak-harvest
mailing list