[Top][All Lists]

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

Re: Optimizing ‘string=’

From: Ludovic Courtès
Subject: Re: Optimizing ‘string=’
Date: Fri, 02 Jul 2010 15:32:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hello Andy!

Andy Wingo <address@hidden> writes:

> On Tue 22 Jun 2010 23:32, address@hidden (Ludovic Courtès) writes:
>> Andy Wingo <address@hidden> writes:
>>> Nasty, but OK I guess if you need it. Why not also add a fast path for
>>> scm_is_eq (s1, s2), or for comparing stringbufs, or something ?
>> Hmm yes.  Though if there are too many fast paths the whole thing ends
>> up being slow.  ;-)
>> I don’t expect (eq? s1 s2) and (eq? (string-buf s1) (string-buf s2)) to
>> be common enough to warrant a more specific special case, though.
> Does it affect your original case at all?

No, I was just comparing strings not eq?.

> In any event, it doesn't involve a memory dereference, only a
> branch. It's a cheap check.

Even cheaper to not do it.  :-)


reply via email to

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