guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: string vs list processing


From: Harvey J. Stein
Subject: Re: string vs list processing
Date: 16 Apr 2001 11:15:08 -0400

Michael Livshin <address@hidden> writes:

 > address@hidden (Harvey J. Stein) writes:
 > 
 > > That (string-ref str 0) takes about the same time as (list-ref lst 0)
 > > is good.  The string ref is checking arguments, indexing into the
 > > array & returning a char.  The list-ref is checking arguments &
 > > dereferencing car of lst.  Actually, I'm a little surprised that
 > > (string-ref ...) isn't slower.
 > 
 > ??? string-ref is of constant complexity, whereas list-ref is of
 > linear complexity.

I was talking about (string-ref ... 0) vs (list-ref ... 0).

-- 
Harvey Stein
Bloomberg LP
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]