Subject: Re: data hygiene [Re: Why is Scheme not a Lisp?]
From: Erik Naggum <erik@naggum.net>
Date: Fri, 22 Mar 2002 17:34:21 GMT
Newsgroups: comp.lang.lisp
Message-ID: <3225807274641011@naggum.net>

* Erann Gat
| It turns out Duane was right and what I was really measuring was the
| difference in implementation efficiency between the built-in getf and
| assoc (which became blatantly obvious when I disassembled *those*.
| Duh!).  When I wrote my own the difference was much smaller, but
| interestingly still there:

  To make this a useful basis of comparison, you should post the code, too.
  I posted my code for alist-get and plist-get with optimized versions with
  hand-tweaked expanded tagbodies.

| Whether this difference is due to the effect that Paul is describing or
| simply due to a compiler quirk is unclear.  I obviously need more
| practice reading disassembly listings.

  You will _never_ have the potential of stalling if you have so short
  lists that they are all in level 1 cache.  Optimizing the access pattern
  of what is basically 16K of registers on the IA32, for instance, is a
  major waste of time.  I have found it useful to use lists of 1 million
  key-value pairs for testing. to ensure that no caching can possibly
  intervene and the cost of memory latency is predominant, which means you
  can repeat the function 100 times without deterioration of maasurements.

///
-- 
  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.