From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Enabling native compilation by default when libgccjit is present Date: Mon, 06 Dec 2021 08:57:40 -0500 Message-ID: References: <83wnkm94oq.fsf@gnu.org> <87y251vdeh.fsf@gnus.org> <87lf11tlzf.fsf@gnus.org> <87r1atrsp9.fsf@gnus.org> <8735n85fa5.fsf@gnus.org> <87r1arskmq.fsf@gnus.org> <87r1arsjpu.fsf@yahoo.com> <87ilw3sjlr.fsf@gnus.org> <87r1ar4mi2.fsf@gmail.com> <874k7nw32n.fsf@gnus.jao.io> <87mtlfasg4.fsf@telefonica.net> <83zgpd28km.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16471"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: rms@gnu.org, ofv@wanadoo.es, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 06 14:58:57 2021 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 1muEW8-00041N-Mh for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Dec 2021 14:58:56 +0100 Original-Received: from localhost ([::1]:55020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muEW7-0004fB-QB for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Dec 2021 08:58:55 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muEVM-0002rL-93 for emacs-devel@gnu.org; Mon, 06 Dec 2021 08:58:08 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:13474) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muEVJ-00022a-56; Mon, 06 Dec 2021 08:58:07 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 097D180297; Mon, 6 Dec 2021 08:58:00 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id A188B80470; Mon, 6 Dec 2021 08:57:55 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1638799075; bh=zvX/9WLfYat15PpeU+EALe6FYUu4xQ+Gmn5Ri+f9L4w=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Iw5e9z78+xl+jtsmXDwjXmMmgnY3zJfvk0Kr0FbpNqaRFd9ugI1rs4078QdIiEzoM 2KCve1244s/rDOplCd/8cSFwXiiA/Kyw9965dfK0V3Dk6hpFPQPp948lEifSIIq6wl ZEhY2rur+03AWyPMOj1uwmnUqWldpJmpcyBjYDkxp5w1llYdt3RsdA9W937kCjVUGB RmT2FDALG/UE/uvwPhrcTpbliKgQF3QgqgMD9ZFMsSKOYVL6atdksxudGQdEzY/F2C HIw5CFF1ohFFS29Bbx5Oho6y6DcAzeZ83FYvCzIE1Idc/0Up/cV2QdIMXmTPS4uCSB hneMZhaL5Hauw== Original-Received: from ceviche (unknown [216.154.30.173]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1E84E120304; Mon, 6 Dec 2021 08:57:55 -0500 (EST) In-Reply-To: <83zgpd28km.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 06 Dec 2021 14:59:05 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:281108 Archived-At: > I don't think this could fly in practice, because I see no way of > predicting when it will provide a benefit. I'm pretty sure it can fly in some practice, but I think it would have to be a JIT rather than AOT compiler: rather than having to predict the proportion of time spent in subrs vs time spent in bytecode.c, it could measure it and (re)compile the parts that seem most promising. I think Java's HotSpot compiler was among the firsts to do this kind of thing, but I expect it's fairly widespread in JIT compilers nowadays. Stefan