From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Enabling native compilation by default when libgccjit is present Date: Mon, 06 Dec 2021 16:08:25 +0200 Message-ID: <83o85t25d2.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33960"; mail-complaints-to="usenet@ciao.gmane.io" Cc: ofv@wanadoo.es, rms@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 06 15:09:45 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 1muEgZ-0008aS-3Z for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Dec 2021 15:09:43 +0100 Original-Received: from localhost ([::1]:47198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1muEgX-0002F7-Vl for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Dec 2021 09:09:41 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muEfW-0000SO-CT for emacs-devel@gnu.org; Mon, 06 Dec 2021 09:08:38 -0500 Original-Received: from [2001:470:142:3::e] (port=52794 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muEfQ-0005v3-UR; Mon, 06 Dec 2021 09:08:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=UglbHDzNlYfy1pPrlxox/LTzvvoJHmiNkRLyfzL3j9Q=; b=fxEm1nJ3lwxq cG3Q5KvCD02jktW13W1gRm5Tmjo55pR5q93Js9inCmLeneEa/rkSs1HU9VNW9J8gcyfHAZbj9KDfd hmriu1GT7RANzH2+ZZ7kgfbJmauh83jS3lxxQRCoj4F/fulIGzvdm5YylsKcisxUBOxNTZ9eLv8Tq zDWkZIEmfMYAih4us72tnFMjS7hLRTzJmHZJErwMHwH6YSlvXbhEFSV9VQn3jSnVy483ywth2Alig 8ijEvBGfqqgUDKqsAo6X70LSKLsQiNu+OCIj4pjmKVpZucY7LBe1d95SgtOTPF6Gn47ChON4fommK S02OSzJR4umHrBpSLZ9rOw==; Original-Received: from [87.69.77.57] (port=2387 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1muEfK-0005K1-QU; Mon, 06 Dec 2021 09:08:27 -0500 In-Reply-To: (message from Stefan Monnier on Mon, 06 Dec 2021 08:57:40 -0500) 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:281113 Archived-At: > From: Stefan Monnier > Cc: rms@gnu.org, ofv@wanadoo.es, emacs-devel@gnu.org > Date: Mon, 06 Dec 2021 08:57:40 -0500 > > > 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. Sounds like a good idea for a PhD.