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

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

Re: Native compilation by default? (was: Re: stats say SBCL is 78 875 %


From: Emanuel Berg
Subject: Re: Native compilation by default? (was: Re: stats say SBCL is 78 875 % faster than natively compiled Elisp)
Date: Wed, 22 Feb 2023 00:54:59 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

>>>> Is my understanding of the documentation - that native
>>>> compilation is an automatic side effect of byte
>>>> compiling, wrong?
>>>
>>> Yes, it's wrong. Native compilation happens automatically
>>> when you _load_ a .elc file, not when you compile it.
>>
>> It doesn't happen when you byte-compile but it also don't
>> happen when you load it, or that depends what you mean by
>> "load"ing.
>
> Use `native-compile', works for individual Elisp files -
> and more.
>
> See an example here:
>
>   https://dataswamp.org/~incal/emacs-init/Makefile

Or do it from Emacs.

I now have 2162 files natively compiled!

Son, he can't handle your speed!

;;; -*- lexical-binding: t -*-
;;
;; this file:
;;   https://dataswamp.org/~incal/emacs-init/native.el
;;
;; also needed:
;;   https://dataswamp.org/~incal/emacs-init/search-regexp-in-files.el

(require 'search-regexp-in-files)

(defun native-compile-all (&optional files)
  (or files (setq files (files-as-list "~/.emacs.d/emacs-init/**/*.el")))
  (dolist (f files)
    (native-compile f) ))

;; (native-compile-all)
;; (native-compile-all (files-as-list "~/.emacs.d/elpa/**/*.el"))
;; (native-compile-all (files-as-list 
"/usr/local/share/emacs/30.0.50/**/*.elc"))

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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