[Top][All Lists]

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


From: Han-Wen Nienhuys
Subject: Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'
Date: Mon, 08 Sep 2008 00:13:23 -0300
User-agent: Thunderbird (X11/20080723)

Neil Jerram escreveu:
> 2008/9/2 Han-Wen Nienhuys <address@hidden>:
>> If you are doing memq? for something you already know to
>> somewhere in front of the list [...]
> Why would you do that?  In two senses:
> 1. I know memq gives you the tail of the list, but I usually use its
> result only as a true/false value Why would run use memq like that in
> a situation where you already know that it will give you true?
> 2. It feels unusual to me to have a long list, but in which certain
> kinds of values are known always to be near the front.  That sounds
> like something that should really be represented as two (or more)
> separate lists.
> Have you observed this (the current usage of SCM_VALIDATE_LIST) as a
> performance problem in practice?

No, but it feels strange to me that a function whose intrinsic function
does not require O(n) behavior, does require it in all cases.

However, I find Mikael's argument that it complicates programming a lot 

 Han-Wen Nienhuys - address@hidden -

reply via email to

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