From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: Is Elisp really that slow? Date: Mon, 13 May 2019 16:33:12 +0200 Message-ID: <86tvdywhjr.fsf@zoho.eu> References: <20190502214006.4fdsinp7u5xuqvdv@Ergus> <20190503004416.xfuzzucflp6bxpuz@Ergus> <8736lm30lz.fsf@web.de> <864l61j04d.fsf@zoho.eu> <20190511073254.GB29829@tuxteam.de> <04187AB9-AD7D-492D-A890-BCB01848370C@icloud.com> <20190511075712.GD29829@tuxteam.de> <86a7fsfv1m.fsf@zoho.eu> <20190512075448.GA11650@tuxteam.de> <346107E9-590D-4A18-9152-ECFF36FC4EDC@icloud.com> <83r293bvok.fsf@gnu.org> <87ef53vihw.fsf@telefonica.net> <83mujrbsk7.fsf@gnu.org> <87a7frvfo1.fsf@telefonica.net> <83h89zbndc.fsf@gnu.org> <875zqfv7sb.fsf@telefonica.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="62297"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 13 16:34:00 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQC1f-000G4S-Ra for geh-help-gnu-emacs@m.gmane.org; Mon, 13 May 2019 16:33:59 +0200 Original-Received: from localhost ([127.0.0.1]:58428 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQC1e-0003lb-Ou for geh-help-gnu-emacs@m.gmane.org; Mon, 13 May 2019 10:33:58 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQC16-0003ip-BQ for help-gnu-emacs@gnu.org; Mon, 13 May 2019 10:33:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQC15-0001tY-7b for help-gnu-emacs@gnu.org; Mon, 13 May 2019 10:33:24 -0400 Original-Received: from [195.159.176.226] (port=37566 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hQC15-0001t1-13 for help-gnu-emacs@gnu.org; Mon, 13 May 2019 10:33:23 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hQC12-000FLC-05 for help-gnu-emacs@gnu.org; Mon, 13 May 2019 16:33:20 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Mail-Copies-To: never Cancel-Lock: sha1:cWoWtSMGWZSxURE/OvtLkxoiE+U= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:120344 Archived-At: Stefan Monnier wrote: >> can this be sped up? >> >> (while (re-search-forward from nil t) >> (replace-match to t)) > > That's a perfect example where no matter how > many man-years you invest into a super-duper > fancy compiler for Elisp, the above code will > not be affected one bit, because all the time > is normally spent within `re-search-forward` > and `replace-match` which are already > implemented in C. Wait, if so, isn't this the solution to the whole problem? 1) Identify what is slow in Elisp. 2) Rewrite it in C? What am I missing? Is there some things that are slow _and_ cannot easily be rewritten in C? Or is there an Elisp-to-C transition penalty? -- underground experts united http://user.it.uu.se/~embe8573