changeset 26256:144cf26f35e1

(Flength): Unroll loop over lists.
author Gerd Moellmann <gerd@gnu.org>
date Sun, 31 Oct 1999 02:01:59 +0000
parents 4ebced8747b7
children 34c767f03890
files src/fns.c
diffstat 1 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/fns.c	Sun Oct 31 02:01:25 1999 +0000
+++ b/src/fns.c	Sun Oct 31 02:01:59 1999 +0000
@@ -148,11 +148,18 @@
     XSETFASTINT (val, XVECTOR (sequence)->size & PSEUDOVECTOR_SIZE_MASK);
   else if (CONSP (sequence))
     {
-      for (i = 0; CONSP (sequence); ++i)
+      i = 0;
+      while (CONSP (sequence))
 	{
-	  if ((i & 0xff) == 0)
-	    QUIT;
 	  sequence = XCDR (sequence);
+	  ++i;
+
+	  if (!CONSP (sequence))
+	    break;
+
+	  sequence = XCDR (sequence);
+	  ++i;
+	  QUIT;
 	}
 
       if (!NILP (sequence))