[r6rs-discuss] [Formal] Requirement to detect circular lists - benchmarks

Aubrey Jaffer agj at alum.mit.edu
Tue Oct 3 17:33:56 EDT 2006


 | Date: Mon, 2 Oct 2006 21:11:12 -0400 (EDT)
 | From: AndrevanTonder <andre at het.brown.edu>
 | 
 | On Mon, 2 Oct 2006, AndrevanTonder wrote:
 | 
 | > Amazingly, the r6rs cycle-checking version is consistently faster
 | > by about 10%.  I would imagine the reason for this is that the
 | > loop is unrolled with respect to the r5rs version.
 | 
 | Correction: I really should have compared the r6rs version with a
 | similarly unrolled version of the r5rs version (below).  Upon doing
 | this, I find that the r5rs and r6rs times are indistinguishable in
 | Stalin.

On which processor?

 | This agrees with Kent Dybvig's experience in Chez.

length-circ accesses data from two locations simultaneously, while the
length-regular accesses only one.  If there is no difference in speed,
then the whole list must be living in the L2 cache.  Performance in
uncontrived list-intensive programs will not be identical.

Also, simply consing long lists sequentially will make their cache
footprints smaller than would consing during execution of a nontrivial
program.



More information about the r6rs-discuss mailing list