unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Hongyi Zhao <hongyi.zhao@gmail.com>
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: The suggested configuration to speed up Emacs with libjansson and native elisp compilation enabled.
Date: Sat, 25 Sep 2021 12:46:47 +0800	[thread overview]
Message-ID: <CAGP6POKA4Ot1wkDD0bNBVf5s6VBn96UA_RGyb7G+eKKhx9_a+Q@mail.gmail.com> (raw)

I noticed the features and techniques to speed up Emacs with
libjansson and native elisp compilation, describe here [1-3]. I'm on
Ubuntu 20.04.2 LTS and compiled the latest git master Emacs with the
following steps:

$ sudo apt install libgccjit0 libgccjit-9-dev libjansson4 libjansson-dev
$ ./configure CFLAGS="-g3 -O2" --without-m17n-flt --with-native-compilation
$ make -j 44 bootstrap
$ make -j44 NATIVE_FULL_AOT=1
$ make tags
$ sudo make install

After I start Emacs with `emacs -Q', I confirmed the above features by
`C-j' the following code snippets in the scratch buffer:

(if (and (fboundp 'native-comp-available-p)
       (native-comp-available-p))
  (message "Native compilation is available")
(message "Native complation is *not* available"))
"Native compilation is available"

(if (functionp 'json-serialize)
  (message "Native JSON is available")
(message "Native JSON is *not* available"))
"Native JSON is available"

But I'm not familiar with these features till now, so I want to know
the suggested configuration for them used in initialization file. Any
hints will be greatly appreciated.

[1] https://akrl.sdf.org/gccemacs.html#orgf5ebdd1
[2] https://ddavis.io/posts/emacs-native-centos7/
[3] https://www.masteringemacs.org/article/speed-up-emacs-libjansson-native-elisp-compilation

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province



             reply	other threads:[~2021-09-25  4:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-25  4:46 Hongyi Zhao [this message]
2021-09-25  7:59 ` The suggested configuration to speed up Emacs with libjansson and native elisp compilation enabled Thibaut Verron
2021-09-25 10:48   ` Hongyi Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGP6POKA4Ot1wkDD0bNBVf5s6VBn96UA_RGyb7G+eKKhx9_a+Q@mail.gmail.com \
    --to=hongyi.zhao@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).