emacs-devel
[Top][All Lists]
Advanced

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

Re: Internationalize Emacs's messages (swahili)


From: Lars Ingebrigtsen
Subject: Re: Internationalize Emacs's messages (swahili)
Date: Sun, 27 Dec 2020 23:49:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

In terms of nthcdr, length< would look like this, and would work for
bignum values of LENGTH.  And it's 15% slower for the benchmark I'm
using:

(let ((list (make-list 10000 nil)))
  (benchmark-run 100000000 (length< list 200)))

DEFUN ("length<", Flength_less, Slength_less, 2, 2, 0,
       doc: /* Return non-nil if SEQUENCE is shorter than LENGTH.
See `length' for allowed values of SEQUENCE and how elements are
counted.  */)
  (Lisp_Object sequence, Lisp_Object length)
{
  if (CONSP (sequence))
    return Fnull (Fnthcdr (Fsub1 (length), sequence));
  else
    return CALLN(Flss, Flength (sequence), length);
}


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




reply via email to

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