sperber(a)informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor]) writes:
(let ((count 1000000))
(while (> count 0)
(cons 1 2)
(setq count (- count 1))))
in 52 seconds on my 43p-140. A fresh one, however, does the trick in
19 seconds.
uname -a: Linux urysohn 2.2.12-20 #1 Mon Sep 27 10:40:35 EDT 1999 i686 unknown
../configure '--debug=no' '--error-checking=none'
'--with-athena=3d'
XEmacs 21.2-b31 "Iris" configured for `i686-pc-linux'.
Fresh
vroonhof 20813 6.7 6.2 10492 7988 pts/3 S 18:16 0:06
Function Name Ticks %/Total Call Count
======================= ===== ======= ==========
- 101 21.720 1000000
88 18.925 1000001
(in garbage
collection) 85 18.280
cons 80 17.204 1000000
setq 73 15.699 1000000
while 38 8.172 1
--------------------------------------------------------
Total 465 100.00
2 days old heavily used (AucTeX + shell + Gnus + etags + w3)
vroonhof 17556 0.5 23.2 33756 29696 pts/0 S Feb29 17:58
Function Name Ticks %/Total Call Count
======================= ===== ======= ==========
(in garbage collection) 347 47.730
90 12.380 1000001
setq
88 12.105 1000000
- 83 11.417 1000000
cons 82 11.279 1000000
while 37 5.089 1
--------------------------------------------------------
Total 727 100.00
One tick = 1 ms
However in the old one the heap is much bigger (see end) so it is not
really unexpected. Thus either
1. The heap is a real ---> We need a generational gc.
2. Something is keeping references to old junk.
Would it be nice if you could somehow find out how much of the storage
is reachable from any single root?
Jan
Output from (garbage-collect) fresh old o/f
=================================================================
conses-used 60677 407658 6.72
conses-free 9291 78882 8.49
cons-storage 842128 5849928 6.95
symbols-used 11680 71437 6.12
symbols-free 0 0 0.10
symbol-storage 282072 1719004 6.09
bit-vectors-used 0 0 0.10
bit-vectors-total-length 0 0 0.10
bit-vector-storage 0 0 0.10
compiled-functions-used 2852 8665 3.04
compiled-functions-free 8 0 0.00
compiled-function-storage 81920 243712 2.97
short-strings-used 26809 115753 4.32
long-strings-used 1302 1310 1.01
strings-free 9859 13075 1.33
short-strings-total-length 689334 2880300 4.18
short-string-storage 884736 3702784 4.19
long-strings-total-length 67520 252578 3.74
string-header-storage 608764 2086900 3.43
floats-used 688 870 1.26
floats-free 388 891 2.30
float-storage 14308 22484 1.57
markers-used 63 1453 23.06
markers-free 21 2202 104.86
marker-storage 2044 87892 43.00
events-used 30 106 3.53
events-free 1 98 98.00
event-storage 3952 23712 6.00
extents-used 94 42954 456.96
extents-free 50 6321 126.42
extent-storage 4096 1382400 337.50
faces-used 57 220 3.86
face-storage 4332 16720 3.86
glyphs-used 116 236 2.03
glyph-storage 5104 10384 2.03
image-instances-used 53 119 2.25
image-instance-storage 5300 11900 2.25
font-instances-used 8 17 2.12
font-instance-storage 288 612 2.12
color-instances-used 12 58 4.83
color-instance-storage 288 1392 4.83
toolbar-buttons-used 15 45 3.00
toolbar-button-storage 1320 3960 3.00
popup-datas-used 1 3 3.00
popup-data-storage 24 72 3.00
gui-items-used 6 4 0.67
gui-items-freed 7 224 32.00
gui-item-storage 336 62 0.18
window-configurations-used 1 3 3.00
window-configurations-freed 1 6 6.00
window-configuration-storage 724 62568 86.42
windows-used 4 32 8.00
window-storage 2048 16384 8.00
frames-used 1 3 3.00
frame-storage 300 900 3.00
devices-used 2 2 1.00
device-storage 336 336 1.00
consoles-used 4 4 1.00
console-storage 416 416 1.00
specifiers-used 1042 3195 3.07
specifier-storage 60364 187452 3.11
timeouts-used 1 1 1.00
timeouts-on-free-list 3 3 1.00
timeout-storage 40 40 1.00
command-builders-used 2 2 1.00
command-builder-storage 112 112 1.00
keymaps-used 257 642 2.50
keymap-storage 10280 3 0.00
extent-auxiliarys-used 78 25680 329.23
extent-auxiliarys-freed 16 1370 85.62
extent-auxiliary-storage 4368 53 0.01
extent-infos-used 12 76720 6393.33
extent-info-storage 240 222 0.92
buffers-used 10 9 0.90
buffer-storage 2840 4440 1.56
opaque_ptrs-used 1 533 532.99
opaque_ptrs-on-free-list 5 151372 30274.34
opaque_ptr-storage 16 1 0.06
opaques-used 573 7 0.01
opaque-storage 52460 16 0.00
range-tables-used 1 3165 3164.97
range-table-storage 16 333829 20864.30
char-tables-used 16 1 0.06
char-table-storage 16768 16 0.00
streams-used 1 106 106.00
streams-on-free-list 3 111088 37029.21
stream-storage 91 85 0.93
hash-tables-used 663 6120 9.23
hash-table-storage 42432 7 0.00
weak-lists-used 1069 3 0.00
weak-list-storage 25656 2 0.00
lcrecord-lists-used 15 733 48.87
lcrecord-list-storage 360 1550 4.31
vectors-used 4715 6 0.00
vectors-freed 6 99200 16533.31
vector-storage 301992 3232 0.01
symbol-value-buffer-locals-used 68 77568 1140.71
symbol-value-buffer-local-storage 2448 16 0.01
symbol-value-lisp-magics-used 24 384 16.00
symbol-value-lisp-magic-storage 1728 14693 8.50
symbol-value-varaliases-used 37 7 0.19
symbol-value-varalias-storage 1036 955880 922.66