help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Problem with position and find (cl)


From: Florian Beck
Subject: Re: Problem with position and find (cl)
Date: Sat, 21 Jun 2008 01:14:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:


> position default test is 'eq, try 'equal

Indeed, many cl-tests default to 'eq.

BTW, what is the reason for this (apart from being a language convention)?

When I try

(let ((start-time (current-time)))
  (dotimes (i 1000000)
    (position '(1) '((2) (5) (2) 2 x  4 fer fer f r e wqf (1) fr r) :test 'eq))
  (format-time-string "%S" (time-since start-time)))

with 'eq and 'equal I get the same result. So 'eq is not more efficent,
is it?


-- 
Florian Beck


reply via email to

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