[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: On elisp running native
From: |
Andrea Corallo |
Subject: |
Re: On elisp running native |
Date: |
Tue, 10 Mar 2020 17:46:12 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Zhu Zihao <address@hidden> writes:
> 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.
Hi Zhu Zihao,
yes there are a lot of ways these benchmarks could be optimized but IMO
these are to have a (as much avg as possible) case to optimize for. We
have taken some of them from the bench game just to have a starting
point but we haven't spent any time to optimize them on purpose.
Perhaps the day we'll want to compare our implementation against others
we'll work on some optimized entry for the bench game.
Thanks!
Andrea
--
address@hidden
- Re: On elisp running native, (continued)
- Re: On elisp running native, Zhu Zihao, 2020/03/10
- Re: On elisp running native,
Andrea Corallo <=
Re: On elisp running native, Spenser Truex, 2020/03/15