From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Samuel Wales Newsgroups: gmane.emacs.help Subject: Re: Is Elisp really that slow? (was: Why is Elisp slow?) Date: Sat, 8 Jun 2019 14:00:23 -0700 Message-ID: References: <87sgtwboot.fsf@telefonica.net> <83muk4obfd.fsf@gnu.org> <20190502214006.4fdsinp7u5xuqvdv@Ergus> <20190503004416.xfuzzucflp6bxpuz@Ergus> <8736lm30lz.fsf@web.de> <864l61j04d.fsf@zoho.eu> <20190511073254.GB29829@tuxteam.de> <20190608085246.GC28228@tuxteam.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="98914"; mail-complaints-to="usenet@blaine.gmane.org" Cc: help-gnu-emacs@gnu.org To: tomas@tuxteam.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jun 08 23:01:10 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.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hZiSb-000PVt-Cd for geh-help-gnu-emacs@m.gmane.org; Sat, 08 Jun 2019 23:01:09 +0200 Original-Received: from localhost ([::1]:60570 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZiST-0007yT-Q4 for geh-help-gnu-emacs@m.gmane.org; Sat, 08 Jun 2019 17:01:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59868) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZiRw-0007yN-DQ for help-gnu-emacs@gnu.org; Sat, 08 Jun 2019 17:00:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZiRu-000683-SO for help-gnu-emacs@gnu.org; Sat, 08 Jun 2019 17:00:28 -0400 Original-Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]:41441) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hZiRu-00065l-GZ for help-gnu-emacs@gnu.org; Sat, 08 Jun 2019 17:00:26 -0400 Original-Received: by mail-lj1-x22e.google.com with SMTP id s21so4653272lji.8 for ; Sat, 08 Jun 2019 14:00:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=3FOOPuFAi7Kjs+9pcoNKPDjIvqO+KUxSqzfSz+RDd2w=; b=D+Zu2o2PoXT5zj2mAQb0p7rWxNlbg93MCECb6Uo468aQIt+AcudwZZKUWK/Lmn1U8S 3OGlQjw0P2AXcqUNPJJoFlhJSfX+vxScRzyNlJDn1hllvf/VKaxiDszWtzvGkoPn1VTN sSagLOIOKBiICE/heqEeIue/livkn6T7EXLOUOFUoLxPyyMeojoh3BfTv0HbEtGrK/rs toLjeDgVGcor9Ov9SgYwqAI7gLrOjJRIqWl0WMF8MQDmo6q2gnlKg9w/93/rxGv9JBK1 +TZ/7texeqIsIb1uT/g02ZGSv24lF/gt9rAvq36mVTW517KRxwbw+gEXDhoKMbj8aUj0 jlfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3FOOPuFAi7Kjs+9pcoNKPDjIvqO+KUxSqzfSz+RDd2w=; b=X+5FCN6/u7HDyJNhskVUGwvJkY3a4CL8fcVWthD5lMQGGl3tpJblwB3cPqu8Ea+0t8 FNrkR90nW3XaLm+tHryNFOp9qZmAtaiKI6HQb4uE05HWphQm+DwpEA9XQPoe7dMgSc1G DxRdCGzCUqLh0WikTwk4oi25ZHtykOjj7Z7xRSQcEnfEJsEmG7pylH9hQlttTiphYLTy z4eYh6Na82ubkK3fleqFEqfAX3LMeu18eqruyFlryHjb+2mQG85CqXRcXsPoHS6fVuJA qxJjOZKgWGcqWsV9XP6MyFO4UDAZsPA/T8oF1+drGqgqnh5F5OmVwSoiIuEPu6Cikmg8 9vpA== X-Gm-Message-State: APjAAAUYcob1htClipLjdrNl6lBM5onmAj7/fkvN601eLqtrbc2bifLz QW/W0eX+iv8SQp3I2JTqjrJ/t9ElEDCHavsWyGI= X-Google-Smtp-Source: APXvYqy7SGBggth4ScqKRMKcg/sz7+MUELUJ0LL2ZX2S1KlX9cHCKeQiIYiSAktC4lgySCR0mf6fkKousOaxX0dwJKU= X-Received: by 2002:a2e:390c:: with SMTP id g12mr21457334lja.17.1560027624382; Sat, 08 Jun 2019 14:00:24 -0700 (PDT) Original-Received: by 2002:ac2:5a5c:0:0:0:0:0 with HTTP; Sat, 8 Jun 2019 14:00:23 -0700 (PDT) In-Reply-To: <20190608085246.GC28228@tuxteam.de> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::22e 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.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:120848 Archived-At: On 6/8/19, tomas@tuxteam.de wrote: > On Fri, Jun 07, 2019 at 05:26:10PM -0700, Samuel Wales wrote: >> well, for me as a mere user, i just want elisp [per se] to run faster. >> maybe that has 1000 definitions, but the 3 things that i have read in >> this thread wfm as PERFECT targets for speeding up and would make >> emacs even better for me. > > Buy a faster computer, then :-) i was going to add somethning like "without buying a supercomputer" but figured nobody would say to get a new computer. an osx help channel was once asked by a disabled person what to do to increase font sizes for the icons. these were not configurable at that time. therefore their response was that there was nothing wrong with osx, and the obvious solution was always for the user to get new glasses. this included all disabled users of all types. i suspect that if they were configurable, the answer would have been that obviously they needed to be configurable. the topic of the thread is elisp speed. it's true that if a significantly faster single-core-throughput computer existed and everybody could have access to it, that would solve the problem. but i don't think it is the question that most of us are discussing in this particular case. it definitely is not the quesiton i was addressing. >> 1] org mode timestamp [aka "daily/weekly"] agenda to complete faster >> for a 2 day [...] > > Dunno about that. Perhaps Org has sub-optimal algorithms there? > Why don't you get your hands dirty and profile the whole thing? we discussed this on this thread. it is optimized to death. it could perhaps be rewritten but has not been and that is a large task. and no, i am not capable of it. and no, that is not the question in this particular case. the question is, can we speed it up, as the topic of the thread states, by speeding up elisp. for example with a faster re matcher. also, take a look at the profile. it's kind of flat. there isn't anything that obviously takes up the time. > >> 2] while re-search-forward do replace-match [iirc] [my question >> which stefan nicely addressed] to work faster. this is a tight loop >> called frequently. > > AFAIR the bottleneck here wasn't Elisp at all, but regexp match, > which is written totally... in C (actually there's a mini-language > layer in-between). So the totally wrong target for this thread: > Elisp ain't slow here because it isn't in the equation at all. > > Do I remember incorrectly? i don't know. i know your feeling. the thread talks about keybindings too and i struggle to figure out that relevance. to me, you remember incorrectly, but i could be wrong. i thoght th thread was abuot speeding uyp elisp. improving the c core or the bytecode or whatever seems to me a perfect speedup. but i am a mere user. > >> 3] elisp to be much faster so that new ideas can be done. > And this is so generic that it's best served by a generic programming > language, which Elisp isn't, and for a good reason. well, what do i know. i thought perhaps c could be sped up, the core could replaced with a really optimized lisp, a fwe new elisp constructs with opimized c like a new re engine could be introduced, etc. > > If you pose a question, you should be ready to expect that the > answer is... "it depends". That's how learning starts :-) i think i am regressing.