[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
issue SHARP-COMMA-CONFUSION, version 1
- To: jonl@lucid.com
- Subject: issue SHARP-COMMA-CONFUSION, version 1
- From: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Tue, 27 Dec 88 16:42 EST
- Cc: KMP@STONY-BROOK.SCRC.Symbolics.COM, sandra%defun@cs.utah.edu, cl-compiler@SAIL.STANFORD.EDU
- In-reply-to: <8812270920.AA01703@bhopal>
Date: Tue, 27 Dec 88 01:20:59 PST
From: Jon L White <jonl@lucid.com>
re: In Cost To Users, the DEFPARAMETER technique described has been
demonstrated to be unacceptable for the general problem.
Although it's probably moot, I strongly object to wording like this,
especially "demonstrated". Such an unproven allegation not only hinders
a clear assessment of the problem at hand ("Cost to Users"), but muddies
the thinking for other issues. Suffice it to say that nearly everyone
who favors flushing #, does so on the assumption that some version of
LOAD-TIME-EVAL will be passed; so the two issues are tightly linked.
A performance allegation on this point was made some time ago in the mails,
but **no** facts or figures were ever adduced. This kind of statement is
not purely philosophical -- one that only needs "clever" arugmentation --
it needs facts.
The continual repetition of the allegation does nothing whatsoever to
verify it.
I had alluded to the fact that I use this in my every-day programming.
I didn't supply actual numbers, but I didn't mean to suggest that there were
no such numbers. I just wasted over an hour of my very valuable time dredging
them up. This had better close discussion on this issue:
The Cloe Window System is written in a flavors implementation similar
to CLOS, and uses a facility similar to LOAD-TIME-VALUE.
For example, there are 135 classes in the Cloe Window System. There are
1340 methods, an average of ten per class. There are generally at least
two references to LOAD-TIME-VALUE per method.
I'll assume that the minimum size of a symbol is 4 words (one for package
pointer, one for a (presumably null) plist, one for a function cell
(presumably undefined), and one for a value cell. Typical implementations
indirect that cell to a cell elsewhere which is the actual value cell, so
add another word. Also add a word or two for the pname. So we're talking
6 words for each symbol itself. Also, these symbols are interned, so I'll
add another two words for the hash table overhead. 8 words.
That's 8 words times 2680 references, or 21,440 words of totally wasted
space.
Now let's back up and look at it another way.
'X typically compiles to an immediate move and does not take a page fault.
A special X reference may take a page fault, and in any case compiles to
a non-immediate move.
eg, consider:
(defvar foo1 2)
(defun foo1 () foo1)
(defun foo2 () '#,(+ 1 1))
Under Genera:
(disassemble 'foo1)
0 ENTRY: 0 REQUIRED, 0 OPTIONAL
1 PUSH-INDIRECT FOO1
2 RETURN-STACK
(disassemble 'foo2)
0 ENTRY: 0 REQUIRED, 0 OPTIONAL
1 PUSH-IMMED 2
2 RETURN-STACK
Under Cloe on a 386:
(disassemble 'foo1)
...
movl [FOO1], esi
movl -2(esi), eax
[optional error checking]
...
(disassemble 'foo2)
...
movl [2], eax
...
So every time we execute one of these references, we're running slower if
we're taking the reference through a special variable rather than
immediately.
Time lost unnecessarily.
Space lost unnecessarily.