[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: stats say SBCL is 78 875 % faster than natively compiled Elisp
From: |
Emanuel Berg |
Subject: |
Re: stats say SBCL is 78 875 % faster than natively compiled Elisp |
Date: |
Thu, 16 Feb 2023 07:04:51 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Jean Louis wrote:
>> ;; commands: [results]
>> ;; $ emacs -Q -batch -l fib.el [8.660 s]
>> ;; $ emacs -Q -batch -l fib.elc [3.386 s]
>> ;; $ emacs -Q -batch -l fib-54a44480-bad305eb.eln [3.159 s]
>> ;; $ sbcl -l fib.cl [0.004 s]
>
> Whatever those stats say
They say CL (with SBCL) is fast; and that natively compiled
Elisp is a good step from byte-compiled Elisp, and a huge leap
from not compiling it at all! However, compared to CL/SBCL our
beloved Elisp/Emacs is still just a turtle on steroids ...
> SBCL does not have tabulated-list-mode and integrated editor
> in the programming environment
Oh, we have Emacs for that! Check this out, including
instructions how to install a bunch of stuff ...
It's SLIME ... as you know well! You are just goofing
around. That's okay.
But while I got it to work, the level of integration is still
below what we have with Elisp. So I thought, with the native
compile step, we could maybe ... but no. Need speed? Use CL.
Simple as that!
;;; -*- lexical-binding: t -*-
;;
;; this file:
;; https://dataswamp.org/~incal/emacs-init/ide/slime-incal.el
;;
;; install quicklisp and cl-sdl2:
;; $ sudo apt-get --install-suggests install \*sbcl\* libsdl2-\*
;; $ mkdir -p ~/common-lisp
;; $ cd ~/common-lisp
;; $ wget 'https://beta.quicklisp.org/quicklisp.lisp'
;;
;; $ sbcl --load quicklisp.lisp
;; * (quicklisp-quickstart:install)
;; * (ql:add-to-init-file)
;; * (quit)
;;
;; CL-USER> (load "~/quicklisp/setup.lisp")
;; CL-USER> (ql:quickload "quicklisp-slime-helper")
;; CL-USER> (ql:update-dist "quicklisp")
;; CL-USER> (ql:update-client)
;;
;; CL-USER> (ql:quickload "sdl2")
;; CL-USER> (ql:quickload :sdl2/examples)
;; CL-USER> (sdl2-examples:basic-test)
;;
;; $ sbcl # boot faster, redo this on update to SLIME or SBCL
;; * (load
"~/quicklisp/dists/quicklisp/software/slime-v2.26.1/swank-loader.lisp")
;; * (swank-loader:dump-image "sbcl.core-with-swank")
;; * (quit)
;; then set `slime-lisp-implementations' as below
(require 'slime)
(require 'slime-autoloads)
(require 'slime-banner)
(require 'slime-repl)
(require 'super)
(load (expand-file-name "~/quicklisp/slime-helper.el"))
(setq inferior-lisp-program "/bin/sbcl")
(setq slime-lisp-implementations
'((sbcl ("sbcl" "--core" "/home/incal/common-lisp/sbcl.core-with-swank")
:init (lambda (port-file _)
(format "(swank:start-server %S)\n" port-file) ))))
(setq slime-startup-animation nil)
(setq slime-words-of-encouragement nil)
;; sldb
(defun sldb-mode-hook-f ()
(disable-super-global-keys sldb-mode-map) )
(add-hook 'sldb-mode-hook #'sldb-mode-hook-f)
;; slime
(defun slime-mode-set-keys ()
(let ((the-map slime-mode-indirect-map))
(disable-super-global-keys the-map)
(define-key the-map "\C-hf" #'slime-describe-function)
(define-key the-map "\M-9" #'slime-eval-last-expression)
(define-key the-map "\M-n" #'slime-eval-buffer) ))
(defun slime-mode-hook-f ()
(abbrev-mode)
(slime-mode-set-keys) )
(add-hook 'slime-mode-hook #'slime-mode-hook-f)
;; slime repl
(defun slime-repl-mode-set-keys ()
(let ((the-map slime-repl-mode-map))
(disable-super-global-keys the-map)
(define-key the-map "\C-\M-n" #'slime-repl-next-input)
(define-key the-map "\C-\M-p" #'slime-repl-previous-input) ))
(defun slime-repl-mode-hook-f ()
(slime-repl-mode-set-keys) )
(add-hook 'slime-repl-mode-hook #'slime-repl-mode-hook-f)
;; (find-file "~/common-lisp/general-base/gb.lisp")
;; (find-file
"~/quicklisp/dists/quicklisp/software/cl-sdl2-20201220-git/examples/basic.lisp")
--
underground experts united
https://dataswamp.org/~incal
- stats say SBCL is 78 875 % faster than natively compiled Elisp, Emanuel Berg, 2023/02/14
- Re: stats say SBCL is 78 875 % faster than natively compiled Elisp, Chen Zhaoyang, 2023/02/15
- 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 <=
- 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, 2023/02/21
- 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