From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.devel Subject: Re: Native compilation: the bird-eye view Date: Sun, 17 May 2020 12:11:45 +0800 Message-ID: <87mu67urni.fsf@localhost> References: <83o8qocd32.fsf@gnu.org> <83ftbzdewp.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="116625"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii , Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 17 06:17:21 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jaAjp-000UFX-69 for ged-emacs-devel@m.gmane-mx.org; Sun, 17 May 2020 06:17:21 +0200 Original-Received: from localhost ([::1]:59800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaAjo-0007wF-7h for ged-emacs-devel@m.gmane-mx.org; Sun, 17 May 2020 00:17:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45442) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaAin-0007Am-Fl for emacs-devel@gnu.org; Sun, 17 May 2020 00:16:17 -0400 Original-Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]:37882) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaAim-0006jW-5T; Sun, 17 May 2020 00:16:17 -0400 Original-Received: by mail-pf1-x42a.google.com with SMTP id y198so1528371pfb.4; Sat, 16 May 2020 21:16:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=UiRlRCzzloDatWVLwymSGetEUJjQKiv51F4FJ2FB/Ac=; b=VMBL62oX01U+lUs7AsTHV1MI2sH5r0gr6EmqHVPP4szJAyRwwn9ZyNudAtSYHvmO7P G2JJxY0L1ogL/mKxDfIdbYFKZ/n5mEhLXVqNPoNqgmJCYVbLIr15CaJHI0onggmnaHKE bUyCV+DIhqzGjGDP1FY27NdLeeHMtf+//qI/XWBcSsn022NplXfzfNxuvvwu1ngoUkd5 F3rZoJPPxZZVb+8vG1j6B9hlshOpiYNXQthaG3cEpH2L2xwLwrylYHfOqeMgfuTnfz7h eQLhgCncPKFVx31aMCnYrm6FgQ4EysUf11IVwBT/1HwdenADrPRU30ccQofMnDSTJYXK mgUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=UiRlRCzzloDatWVLwymSGetEUJjQKiv51F4FJ2FB/Ac=; b=PufUj2aijMWs/uR290zX6KuoOgDVaf9F2oVUO2E/hKBHUq6Ai7zZ51+PLSVs1Ol7oM MMVcJCLHhk5MY0b+FsZCQth1qu++5qPXMiWULAT09gxtOCecbUP8m1tzbHVgK59fWViL SnAgdEnK4D2UsccSnY0l0AaC1BuNzM8yCkhAwqwvUkC7a9EmyRx4QhmuBFMISUHomTEA x+bbVNugGLpQWZ0BGJXBuknfIP9hGQLlZ7PvGaPrUtUkXhizG8z0wojhwZq1K5LevQBI bqRFT7D/r5QPOinkCBcyZwCpKAaPjbnTKwJ7Q+aHipqBQkBluzxgItW4oZSHczu4XZtz djOw== X-Gm-Message-State: AOAM532g+Mk+CjOqy5rrYQcqQn/gWeIzEwYtPOdXRpx902e4NtJZ8Flq s69yPd0p9p0VHb5aOVaJRtzDcq3Qkk0ONw== X-Google-Smtp-Source: ABdhPJxi2IQMAlW7l+abzNAUwmGs8gh8fbdN52akbpXDdcBaM/1HMqBwzWiQd+8+3xUvIypclrybrA== X-Received: by 2002:a63:b146:: with SMTP id g6mr9447569pgp.396.1589688972017; Sat, 16 May 2020 21:16:12 -0700 (PDT) Original-Received: from localhost ([23.27.206.164]) by smtp.gmail.com with ESMTPSA id m188sm5381028pfd.67.2020.05.16.21.16.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 May 2020 21:16:11 -0700 (PDT) In-Reply-To: <83ftbzdewp.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=yantar92@gmail.com; helo=mail-pf1-x42a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:250564 Archived-At: > And for the "non-average" user, who builds Emacs from sources? AFAIU, > native compilation of all Lisp files takes many hours even on fast > machines -- won't this be an annoyance if we don't come up with a JIT > mechanism? I am using Gentoo and thus compiling pretty much everything from source. According to my experience so far, compilation takes even more time than compiling something like chromium. Moreover, I got memory overflow (for 8Gb RAM) when compiling ja-dic.elc. In order to compile that file, I had to manually fallback to comp-speed 0. Eli Zaretskii writes: >> From: Andrea Corallo >> Date: Sat, 16 May 2020 12:58:11 +0000 >> Cc: emacs-devel@gnu.org >> >> > If so, they will have >> > to be generated on the end-user machines, or perhaps by whoever >> > prepares the Emacs binary distributions -- assuming that the binary >> > distributions are sufficiently compatible to allow that, >> > notwithstanding the differences between the system where the *.eln >> > files were generated and the system where they will be installed and >> > used. (I don't know what is the granularity of the binary distros wrt >> > machine architecture and OS versions -- will that allow to be sure the >> > *.eln files are compatible with the target system?) >> >> Given .eln are just shareds with (almost) no dependecies [1] their >> degree of compatibility should be higher then the Emacs binary itself. > > Well, the "almost" part means we aren't actually sure about this. > E.g., what about the dependencies related to the GCC version used to > build libgccjit and compile the .eln files? > >> > The next question is whether we want the *.eln files to exist up front >> > for all the Lisp files on the end-user system, or we want them to be >> > generated in JIT-like manner, whenever the corresponding Lisp library >> > is loaded on demand? The answer to this question might then influence >> > the place where the *.eln files are kept -- the JIT alternative would >> > suggest to have some kind of cache directory where we put the compiled >> > files, similar to what Guile does. >> >> I suspect that for the average user the best is to have the distribution >> do all the compilation upfront for him and have deferred compilation >> handling only additional libraries and packages. > > And for the "non-average" user, who builds Emacs from sources? AFAIU, > native compilation of all Lisp files takes many hours even on fast > machines -- won't this be an annoyance if we don't come up with a JIT > mechanism? > -- Ihor Radchenko, PhD, Center for Advancing Materials Performance from the Nanoscale (CAMP-nano) State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong University, Xi'an, China Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg