Subject: Re: data hygiene [Re: Why is Scheme not a Lisp?] From: Erik Naggum <email@example.com> Date: Fri, 22 Mar 2002 07:59:47 GMT Newsgroups: comp.lang.lisp Message-ID: <firstname.lastname@example.org> * Erann Gat > Using MCL 4.3.1: > > ? (setf l1 '(a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8)) > (A 1 B 2 C 3 D 4 E 5 F 6 G 7 H 8) > ? (setf l2 '((a . 1) (b . 2) (c . 3) (d . 4) (e . 5) (f . 6) (g . 7) (h . 8))) > ((A . 1) (B . 2) (C . 3) (D . 4) (E . 5) (F . 6) (G . 7) (H . 8)) > ? (getf l1 'h) > 8 > ? (assoc 'h l2) > (H . 8) > ? (time (dotimes (i 1000000) (assoc 'h l2))) > ;Compiler warnings : > ; Undeclared free variable L2, in an anonymous lambda form. > (DOTIMES (I 1000000) (ASSOC 'H L2)) took 192 milliseconds (0.192 seconds) > to run. > NIL > ? (time (dotimes (i 1000000) (getf l1 'h))) > ;Compiler warnings : > ; Undeclared free variable L1, in an anonymous lambda form. > (DOTIMES (I 1000000) (GETF L1 'H)) took 740 milliseconds (0.740 seconds) to run. > Of that, 10 milliseconds (0.010 seconds) were spent in The Cooperative > Multitasking Experience. > 200 bytes of memory allocated. > NIL * Duane Rettig | We should look at this carefully, Erann. It is possible you are | measuring the wrong thing here. Not only that, but the "Cooperative Multitasking Experience" seems like a fairly suspicious thing to include in such a test. One would hope that at least a sufficient number of samples to produce statistically significant results would have been included. (I seem to recall a lot of noise about statistical significance.) The above really says nothing -- for all we know, the system could have been swapping like mad, and that would be system time instead of user time, but such is not distinguished. A suffiently large sample would have removed such unintended 'spikes" from the data set. /// -- In a fight against something, the fight has value, victory has none. In a fight for something, the fight is a loss, victory merely relief.