]> git.eshelyaron.com Git - emacs.git/commitdiff
Use the new obarray type for the initial obarray
authorMattias EngdegÄrd <mattiase@acm.org>
Sun, 11 Feb 2024 14:11:21 +0000 (15:11 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 28 Feb 2024 17:42:16 +0000 (18:42 +0100)
This can improve performance a lot, especially after the obarray has
been fed many symbols.

* src/lread.c (OBARRAY_SIZE): Remove.
(load_path_check): Create an obarray object instead of a vector.

(cherry picked from commit 3ea77c735de975ebda707e0e1e8bb5e0adad2bf5)

src/lread.c

index c4a34c5d73f140c3fb8a9410c35c9bafefb4c6e1..49683d02401e555cbc9643c478dfb9deb4b39e38 100644 (file)
@@ -5446,13 +5446,10 @@ DEFUN ("internal--obarray-buckets",
   return Fnreverse (ret);
 }
 
-#define OBARRAY_SIZE 15121
-
 void
 init_obarray_once (void)
 {
-  /* FIXME: use PVEC_OBARRAY */
-  Vobarray = make_vector (OBARRAY_SIZE, make_fixnum (0));
+  Vobarray = make_obarray (15);
   initial_obarray = Vobarray;
   staticpro (&initial_obarray);