[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Native compilation by default?: Was [Re: stats say SBCL is 78 875 % fast
From: |
Madhu |
Subject: |
Native compilation by default?: Was [Re: stats say SBCL is 78 875 % faster than natively compiled Elisp |
Date: |
Tue, 21 Feb 2023 12:34:21 +0530 |
pardon the blog -- to test the validity of the claims in this thread I
was trying to run
```
(time (fib 2000 500))
(time (slynk::eval-in-emacs '(fib 5000 500)))
```
from within some lisp to compare the elapsed time.
However when I tried to "native" compile Emanuel Berg's fib function in
a file fib.el
```
;; -*- lexical-binding: t -*-
(defun fib (reps num)
(let ((z 0))
(dotimes (_ reps)
(let ((p1 1)
(p2 1))
(dotimes (_ (- num 2))
(setf z (+ p1 p2)
p2 p1
p1 z))))
z))
```
with (byte-compile-file "fib.el" t)
I got a fib.elc which was loaded, but the file was not natively
compiled.
(dissassemble 'fib) only shows the byte code.
I was under the impression that this should have automatically produced
an eln file with default native-* variables which i've reviewed.
I was able to produce the eln file with an explicit call to
```
(load (native-compile "fib.el"))
or M-x emacs-lisp-native-compile-and-load
```
and load it and dissassemble it
Is my understanding of the documentation - that native compilation is an
automatic side effect of byte compiling, wrong?
Last tried on the `master' branch with sources from around 2023-02-15
- full native compile (was: Re: stats say SBCL is 78 875 % faster than natively compiled Elisp), (continued)
- full native compile (was: Re: stats say SBCL is 78 875 % faster than natively compiled Elisp), Emanuel Berg, 2023/02/15
- Re: stats say SBCL is 78 875 % faster than natively compiled Elisp, Jean Louis, 2023/02/16
- Re: stats say SBCL is 78 875 % faster than natively compiled Elisp, Emanuel Berg, 2023/02/16
- Re: stats say SBCL is 78 875 % faster than natively compiled Elisp, Jean Louis, 2023/02/17
- Re: stats say SBCL is 78 875 % faster than natively compiled Elisp, Emanuel Berg, 2023/02/18
- Re: stats say SBCL is 78 875 % faster than natively compiled Elisp, Emanuel Berg, 2023/02/18
- Re: stats say SBCL is 78 875 % faster than natively compiled Elisp, Eli Zaretskii, 2023/02/18
- Re: stats say SBCL is 78 875 % faster than natively compiled Elisp, Emanuel Berg, 2023/02/18
- Re: stats say SBCL is 78 875 % faster than natively compiled Elisp, Eli Zaretskii, 2023/02/19
- Native compilation by default?: Was [Re: stats say SBCL is 78 875 % faster than natively compiled Elisp,
Madhu <=
- Re: Native compilation by default?: Was [Re: stats say SBCL is 78 875 % faster than natively compiled Elisp, Eli Zaretskii, 2023/02/21
- Re: Native compilation by default?: Was [Re: stats say SBCL is 78 875 % faster than natively compiled Elisp, Emanuel Berg, 2023/02/21
- Re: Native compilation by default?: Was [Re: stats say SBCL is 78 875 % faster than natively compiled Elisp, Emanuel Berg, 2023/02/21
- Re: Native compilation by default? (was: Re: stats say SBCL is 78 875 % faster than natively compiled Elisp), Emanuel Berg, 2023/02/21
- Re: Native compilation by default? (was: Re: stats say SBCL is 78 875 % faster than natively compiled Elisp), Emanuel Berg, 2023/02/21
- Message not available
- Re: Native compilation by default? (was: Re: stats say SBCL is 78 875 % faster than natively compiled Elisp), Emanuel Berg, 2023/02/21
- Re: Native compilation by default? (was: Re: stats say SBCL is 78 875 % faster than natively compiled Elisp), Emanuel Berg, 2023/02/23
- Re: Native compilation by default? (was: Re: stats say SBCL is 78 875 % faster than natively compiled Elisp), Jean Louis, 2023/02/23
- Re: Native compilation by default? (was: Re: stats say SBCL is 78 875 % faster than natively compiled Elisp), Emanuel Berg, 2023/02/27
- Re: Native compilation by default?: Was [Re: stats say SBCL is 78 875 % faster than natively compiled Elisp, Eli Zaretskii, 2023/02/22