[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()'
From: |
Han-Wen Nienhuys |
Subject: |
Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()' |
Date: |
Mon, 08 Sep 2008 00:13:23 -0300 |
User-agent: |
Thunderbird 2.0.0.16 (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
persuasive.
--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen
- Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()', (continued)
Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()', Han-Wen Nienhuys, 2008/09/01
Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()', Andy Wingo, 2008/09/04
- Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()', Han-Wen Nienhuys, 2008/09/04
- Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()', Andy Wingo, 2008/09/04
- Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()', Neil Jerram, 2008/09/06
- Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()', Han-Wen Nienhuys, 2008/09/06
- Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()', Neil Jerram, 2008/09/07
- Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()', Han-Wen Nienhuys, 2008/09/07
- Re: [PATCH] Avoid `SCM_VALIDATE_LIST ()', Neil Jerram, 2008/09/07