From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: The suggested configuration to speed up Emacs with libjansson and native elisp compilation enabled. Date: Sat, 25 Sep 2021 12:46:47 +0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36628"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 25 06:47:27 2021 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 1mTzaw-0009JC-UN for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 25 Sep 2021 06:47:26 +0200 Original-Received: from localhost ([::1]:39650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTzav-0005RG-Qb for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 25 Sep 2021 00:47:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTzaY-0005R3-Tc for help-gnu-emacs@gnu.org; Sat, 25 Sep 2021 00:47:02 -0400 Original-Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]:33640) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTzaX-0006dP-43 for help-gnu-emacs@gnu.org; Sat, 25 Sep 2021 00:47:02 -0400 Original-Received: by mail-lf1-x12c.google.com with SMTP id y28so48664522lfb.0 for ; Fri, 24 Sep 2021 21:47:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=Lv68hZztuifJePV7v+ZOZZE5So5QkOph6ZQVldqvOyE=; b=ORikTdbUrDQaPSqWbw9EKFLYOZfOw8UQtS1FhTqiyqNVzbVDwA5HG00CvtWk1MzNLc SbIxaaHOlV0gRh0Varl/5fgpLkMrKD9J+Hm2Whe6TSFtRshc0yBFqX6tYHM+oZz0Ukxm cFkPLvAizFtrjMvfeSNdhdBGYg1nLnLuQ+vSFiLFERjc2rjhbD7IUL6eRogrXEtHQ7WO BwMbeOy4hPX3sL/5Xeq0jzH+vL/ZzM598w6ywjwhw5EmZwhKCSnBBPNKoCCR526tX2Gn mOx2t15LiZvd80WJE0mdj9Fpi9Y7S1kzxj/MvtMhnrgbxw8gCnbRg84FasPWfN2Jb+Pt R/CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Lv68hZztuifJePV7v+ZOZZE5So5QkOph6ZQVldqvOyE=; b=19Uksp7dq3JB1CxGS63Ew3mSH7IQhhWb6Ep5a4Wgbb9YKjw1VW3BoWcuijZjXzAoaN VdZDbCRBW6cQR7AoEOLIkY0TLOvfb0jNSNriLhjuFXvm8W2dN4SAPW9yu2/09EDLlSQn EZRz+jVbbVLhJNoEeOpfP3GlG1nAMQ3isROOPpYMlfqHCjUGct9muDs6G4VLFK2q9aLD QxMTKkSBEoM6i4jKyEKnORqajjI6PMlFvmChsoV4CxiVCRa0gfS9WK2PoK2Bi1l15hkD UjD1lSnbDc0lpNhXkLRItEK/fAbxKsiWv30g1wme72ztOtcVcq0FoGvR4KThFeK2JwYR MdjQ== X-Gm-Message-State: AOAM531CY2izHDVHdoPMOq4/XrFpE8cuDqfnNMNPOfYye9/Q5bWKHeA+ YeqjXID+EjU4wKPgSE8sqfBq61NjsNeIT5rgVhKE6meVaNSooG0L X-Google-Smtp-Source: ABdhPJwzscQhIeZKM1xWJ3y8o6uLS6z/V/eTNqMKG10bfpIr2B2aVGSfQMBW1cSGFsTsFX0yBvegCiGppve2oEFBrfY= X-Received: by 2002:a05:6512:3f9f:: with SMTP id x31mr13488902lfa.233.1632545219097; Fri, 24 Sep 2021 21:46:59 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=hongyi.zhao@gmail.com; helo=mail-lf1-x12c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.help:133228 Archived-At: 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 Theory and Simulation of Materials Hebei Vocational University of Technology and Engineering No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province