 (defvar doom-init-time nil
   "The time it took, in seconds, for DOOM Emacs to initialize.")
 
-(defvar doom-modules ()
+(defvar doom-modules
+  (make-hash-table :test #'equal :size 90 :rehash-threshold 1.0)
   "A hash table of enabled modules. Set by `doom-initialize-modules'.")
 
 (defvar doom-packages ()

                    (file-relative-name file doom-emacs-dir)
                    (error-message-string ex))))))
      (when (or force-p (not doom-modules))
        (setq doom-modules nil
              doom-packages nil)
        (_load (concat doom-core-dir "core.el") nil 'interactive)
        (_load (expand-file-name "init.el" doom-emacs-dir))

  "Bootstrap DOOM Emacs.

MODULES is an malformed plist of modules to load."
  `(let (file-name-handler-alist)
     ,@(let (init-forms config-forms mode)
         (dolist (m modules)
           (cond ((keywordp m) (setq mode m))
                 ((not mode)   (error "No namespace specified in `doom!' for %s" m))
                 (t
                  (let* ((module    mode)
                         (submodule (if (listp m) (car m) m))
                         (flags     (if (listp m) (cdr m)))
                         (path      (doom-module-path module submodule)))
                    (doom-module-enable module submodule flags)
                    (push `(load! init   ,path t) init-forms)
                    (unless noninteractive
                      (push `(load! config ,path t) config-forms))))))
         (nconc (nreverse init-forms)
                (nreverse config-forms)))
     (setq doom-modules ',doom-modules)
     (unless noninteractive
       (when (display-graphic-p)
         (require 'server)
         (unless (server-running-p)
           (server-start)))
       (add-hook 'doom-post-init-hook #'doom-packages--display-benchmark))))

(defmacro def-package! (name &rest plist)
  "A thin wrapper around `use-package'."
