From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: stats say SBCL is 78 875 % faster than natively compiled Elisp Date: Thu, 16 Feb 2023 07:04:51 +0100 Message-ID: <878rgyjgcc.fsf@dataswamp.org> References: <87bklw7ka3.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12183"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: help-gnu-emacs@gnu.org Cancel-Lock: sha1:XQQdaSwjE2Hyua+fFafn7xzkXfc= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 16 20:46:57 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pSkDZ-0002xx-HD for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 16 Feb 2023 20:46:57 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSkCn-0007JF-Ez; Thu, 16 Feb 2023 14:46:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSXOD-00030v-LZ for help-gnu-emacs@gnu.org; Thu, 16 Feb 2023 01:05:05 -0500 Original-Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSXOA-0003zA-OK for help-gnu-emacs@gnu.org; Thu, 16 Feb 2023 01:05:05 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pSXO6-0002HO-HN for help-gnu-emacs@gnu.org; Thu, 16 Feb 2023 07:04:58 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Mail-Copies-To: never Received-SPF: pass client-ip=116.202.254.214; envelope-from=geh-help-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 16 Feb 2023 14:46:06 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142768 Archived-At: 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