[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: On elisp running native
From: |
Zhu Zihao |
Subject: |
Re: On elisp running native |
Date: |
Wed, 11 Mar 2020 00:15:40 +0800 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Gojō) APEL/10.8 EasyPG/1.0.0 Emacs/27.0 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
I' ve read some code of your benchmark. And there's a simple way to optimize
these bench programs a littel bit.
For some program use cl-defstruct, you can put `(cl-declaim (optimize (speed
3)))` in the file. This instructment will tell Emacs byte-compiler to delete
runtime type check code (which is harmful in bench game) in struct accessor.
An example is
https://gitlab.com/koral/elisp-benchmarks/-/blob/master/benchmarks/nbody.el.
After adding instructment and byte-compilation, the bench result is
(benchmark-run (elb-nbody-entry))
;; => (28.996680579 107 15.392465563000002)
28s was taken in 1000000 times iteration. And I believe native-comp will get
better result.
--
Zihao
- Re: On elisp running native - Update7, (continued)
- Re: On elisp running native,
Zhu Zihao <=
- Re: On elisp running native, Andrea Corallo, 2020/03/10
Re: On elisp running native, Spenser Truex, 2020/03/15