[gsharp-devel] redraw buglets
Christophe Rhodes
csr21 at cam.ac.uk
Mon Jul 19 20:25:49 UTC 2004
Christophe Rhodes <csr21 at cam.ac.uk> writes:
> 1 213 5.9 213 5.9 SB-BIGNUM:BIGNUM-GCD
> 2 171 4.8 384 10.7 SB-BIGNUM::SUBTRACT-BIGNUM-BUFFERS
> 3 139 3.9 523 14.5 "XEP for #'(SB-KERNEL:INSTANCE-LAMBDA (SB-PCL::.ARG0.) (LET NIL # ...))"
> 4 122 3.4 645 17.9 SB-BIGNUM::MAKE-GCD-BIGNUM-ODD
> 5 100 2.8 745 20.7 SB-BIGNUM::BIGNUM-GCD-ORDER-AND-SUBTRACT
> 6 96 2.7 841 23.4 "XEP for #'(SB-KERNEL:INSTANCE-LAMBDA (SB-PCL::.ARG0. SB-PCL::.ARG1. SB-PCL::.ARG2. ...) (LET NIL # ...))"
> 7 95 2.6 936 26.0 SB-KERNEL::%%TYPEP
> 8 89 2.5 1025 28.5 SB-BIGNUM::BIGNUM-BUFFER-ASHIFT-RIGHT
> 9 88 2.4 1113 31.0 SB-KERNEL:TWO-ARG-+
> 10 81 2.3 1194 33.2 SB-KERNEL:CLASSOID-TYPEP
Here are some more numbers, from profiling (with the regular profiler)
all functions in gsharp's own packages (but not CLIM or X-related
ones).
seconds | consed | calls | sec/call | name
-------------------------------------------------------------
39.229 | 550,292,048 | 1 | 39.229393 | GSHARP::RUN-GSHARP
17.950 | 42,999,328 | 23,237 | 0.000772 | SCORE-PANE::MAKE-PIXMAP-RECORD
16.849 | 36,449,032 | 21,135 | 0.000797 | SCORE-PANE::MAKE-RECTANGLE-RECORD
7.168 | 32,446,368 | 21,135 | 0.000339 | SCORE-PANE::ADD-NEW-RECTANGLE-RECORD
6.644 | 8,482,896 | 32,962 | 0.000202 | SCORE-PANE::MEDIUM-DRAW-NOTEHEAD
6.269 | 11,886,152 | 10,366 | 0.000605 | SCORE-PANE::DRAW-SEGMENT
5.188 | 8,387,400 | 25,310 | 0.000205 | SCORE-PANE::MEDIUM-DRAW-STEM
4.645 | 6,632,224 | 23,237 | 0.000200 | SCORE-PANE::ADD-NEW-PIXMAP-RECORD
Some of the blame might lie in gsharp's MAKE-PIXMAP-RECORD and
MAKE-RECTANGLE-RECORD: the way they're written inhibits a CLOS
optimization: if make-instance sees a constant class name and constant
initargs, and there are no applicable methods on
(setf slot-value-using-class), then a certain amount of heavyweight
dispatch can be avoided. However, given the statistical profiling
results indicating that bignums or ratios were the bottleneck, this is
likely only to be a side issue.
I think I'd investigate the medium transformation, and the various
coordinates associated with pixmaps and rectangles, and see if any of
those are overly precise...
Cheers,
Christophe
--
http://www-jcsu.jesus.cam.ac.uk/~csr21/ +44 1223 510 299/+44 7729 383 757
(set-pprint-dispatch 'number (lambda (s o) (declare (special b)) (format s b)))
(defvar b "~&Just another Lisp hacker~%") (pprint #36rJesusCollegeCambridge)
More information about the gsharp-devel
mailing list