unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: Matthew Mundell <matt@mundell.ukfsn.org>, emacs-devel@gnu.org
Subject: Re: Compilation to native
Date: 23 Mar 2004 23:43:28 +0100	[thread overview]
Message-ID: <x5r7vjp4kv.fsf@lola.goethe.zz> (raw)
In-Reply-To: <E1B5q0i-0003DQ-1P@fencepost.gnu.org>

Richard Stallman <rms@gnu.org> writes:

>     The loop _is_ purely computational.
> 
> I was fooled by the indentation, which makes it appear
> that the call to current-time-string is inside the loop.
> See?
> 
>     (defun silly-loop (n)
>       "Return time before and after N iterations of a loop."
>       (let ((t1 (current-time-string)))
> 	(while (> (setq n (1- n))
> 			      0))
> 	    (list t1 (current-time-string))))
> 
> Anyway, such a small speedup is not worth the trouble.

A factor of 2 for a first attempt?  I don't think that is something
one should toss lightly.

I have jobs here where Emacs spends close to two hours formatting some
text in the size of an order of 1MB.  If things could be cut into
half, that would help a lot.  Of course, the solution in the end is
to replace the ad-hoc code by something optimized very thoroughly and
with all O(n^2) elements removed, but don't forget one thing:

Emacs, among other things, is a grand platform for solving problems
ad-hoc, and fast prototypes often happen to be inefficient.

Cutting times in half, if it turns out that this will be more or less
a sustained gain, helps a lot in that ballpark.

> Compilation of CCL may be worth while.  Or optimization of the CCL
> interpreter may be possible.

You bet.  Saving such a text file takes minutes on my machine, which
is plainly ridiculous (600MHz laptop).  It is also disconcerting when
you have to save because your laptop batteries are running out, and
you don't know whether the (computationally intensive) save will
finish before things break down.  Of course, the autosave (which is
done unconverted) should be up to par, but it still is a nuisance if
the box hangs saving.

I also have other things like preparing large Usenet groups where
cutting the time in half would be quite an advantage.  Yes, many
things might probably be done by substituting elaborate algorithms,
but that improves things only at one place.  Overall speedups benefit
everything.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2004-03-23 22:43 UTC|newest]

Thread overview: 186+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-10 16:25 Compilation to native Matthew Mundell
2004-03-20 21:52 ` Matthew Mundell
2004-03-21 19:21   ` Richard Stallman
2004-03-22 16:54     ` Juri Linkov
2004-03-22 21:37       ` Stefan Monnier
2004-03-23 13:56         ` Juri Linkov
2004-03-24 23:50           ` Matthew Mundell
2004-03-24 23:57             ` Miles Bader
2004-03-22 23:44       ` Matthew Mundell
2004-03-23 13:57         ` Juri Linkov
2004-03-24 23:51           ` Matthew Mundell
2004-03-23 17:47       ` Richard Stallman
2004-04-07 11:57         ` Kenichi Handa
2004-04-07 12:45           ` David Kastrup
2004-04-07 13:12             ` Kenichi Handa
2004-04-07 23:52               ` Alex Schroeder
2004-04-08  0:28                 ` Kenichi Handa
2004-04-08  2:35                 ` It is time for a feature freeze (it is NOW or never) Kim F. Storm
2004-04-08  2:03                   ` Kenichi Handa
2004-04-08  3:13                     ` John Wiegley
2004-04-08  4:25                       ` YAMAMOTO Mitsuharu
2004-04-08  5:58                         ` John Wiegley
2004-04-08 11:26                         ` Piet van Oostrum
2004-04-08  8:46                     ` Jason Rumney
2004-04-08 15:46                       ` Kim F. Storm
2004-04-08 15:44                     ` Kim F. Storm
2004-04-08 15:06                       ` David Kastrup
2004-04-08 16:22                     ` Stefan Monnier
2004-04-09  1:36                       ` Miles Bader
2004-04-09 23:43                         ` Kim F. Storm
2004-04-09 23:58                           ` Miles Bader
2004-04-10  0:08                         ` Miles Bader
2004-04-10 18:31                           ` Kim F. Storm
2004-04-10 17:53                             ` Romain Francoise
2004-04-10 22:06                               ` Kim F. Storm
2004-04-11  3:08                             ` Kenichi Handa
2004-04-11 11:04                               ` David Kastrup
2004-04-12  7:48                               ` Lőrentey Károly
2004-04-11  2:34                         ` Richard Stallman
2004-04-11  9:06                           ` Miles Bader
2004-04-12  4:24                             ` Miles Bader
2004-04-12 21:10                               ` Kim F. Storm
2004-04-12 20:48                                 ` Miles Bader
2004-04-13 17:44                               ` Richard Stallman
2004-04-10 23:19                       ` Juri Linkov
2004-04-08  2:05                   ` Miles Bader
2004-04-08  2:34                     ` Kenichi Handa
2004-04-08  3:39                       ` Miles Bader
2004-04-08 16:30                       ` Redisplay crash Stefan Monnier
2004-04-09  1:57                         ` Kenichi Handa
2004-04-13 10:00                           ` Piet van Oostrum
2004-04-18 21:47                           ` Richard Stallman
2004-04-09 22:44                         ` Richard Stallman
2004-04-10 18:36                           ` Kim F. Storm
2004-04-12  3:52                             ` Richard Stallman
2004-04-08  7:53                   ` It is time for a feature freeze (it is NOW or never) Romain Francoise
2004-04-08 16:00                     ` Kim F. Storm
2004-04-08 15:54                       ` Romain Francoise
2004-04-09 22:44                         ` Richard Stallman
2004-04-10  1:37                           ` Kim F. Storm
2004-04-10  1:09                             ` Kenichi Handa
2004-04-12  3:51                               ` Richard Stallman
2004-04-14 14:57                                 ` Kim F. Storm
2004-04-20 21:30                                   ` Stefan Monnier
2004-05-01 20:16                                     ` Kim F. Storm
2004-05-01 23:21                                       ` Miles Bader
2004-05-01 21:49                                         ` Kim F. Storm
2004-05-02  7:30                                         ` David Kastrup
2004-05-02 16:06                                         ` Stefan Monnier
2004-05-02 18:12                                           ` Nick Roberts
2004-05-02 18:43                                             ` David Kastrup
2004-05-02 20:14                                               ` Nick Roberts
2004-05-03 10:29                                                 ` Jason Rumney
2004-05-03 14:03                                               ` Richard Stallman
2004-05-03 19:06                                                 ` Jan D.
2004-05-08  1:21                                                   ` Richard Stallman
2004-05-08 11:14                                                     ` Jan D.
2004-05-08 11:35                                                       ` David Kastrup
2004-05-09 10:38                                                       ` Richard Stallman
2004-05-12 10:00                                                         ` B&W icons (was It is time for a feature freeze (it is NOW or never).) Jan D.
2004-05-02 19:16                                             ` It is time for a feature freeze (it is NOW or never) Stefan Monnier
2004-05-02 22:26                                               ` Juanma Barranquero
2004-05-03  5:44                                                 ` Kim F. Storm
2004-05-03  9:13                                                   ` Juanma Barranquero
2004-05-03  8:52                                     ` Kim F. Storm
2004-05-03 13:21                                       ` Stefan Monnier
2004-05-03 22:20                                         ` Richard Stallman
2004-05-13 17:14                                           ` Stefan Monnier
2004-05-13 21:50                                             ` Kim F. Storm
2004-05-13 22:48                                               ` Stefan Monnier
2004-05-14 12:18                                             ` YAMAMOTO Mitsuharu
2004-05-14 12:49                                               ` Kenichi Handa
2004-05-03 21:00                                     ` Kim F. Storm
2004-05-04  7:14                                       ` David Kastrup
2004-05-04  8:09                                         ` Juanma Barranquero
2004-05-04  8:17                                           ` David Kastrup
2004-05-04  6:34                                             ` Kim F. Storm
2004-05-04  8:52                                               ` Juanma Barranquero
2004-05-04 13:45                                                 ` Stefan Monnier
2004-05-04 13:58                                                   ` Juanma Barranquero
2004-05-04  8:26                                             ` Juanma Barranquero
2004-05-04 13:44                                         ` Stefan Monnier
2004-05-04 14:26                                           ` Juanma Barranquero
2004-05-04 14:37                                           ` David Kastrup
2004-05-04 20:07                                       ` Richard Stallman
2004-05-04 22:21                                         ` David Kastrup
2004-05-04 21:18                                           ` Kim F. Storm
2004-05-04 23:49                                             ` David Kastrup
2004-05-05  0:23                                               ` Luc Teirlinck
2004-05-05  9:24                                                 ` David Kastrup
2004-05-04 22:24                                           ` Miles Bader
2004-05-05  1:04                                           ` Robert J. Chassell
2004-04-12  3:50                             ` Richard Stallman
2004-04-12  4:15                               ` Miles Bader
2004-04-13 17:44                                 ` Richard Stallman
2004-04-16 13:15                                 ` Kenichi Handa
2004-04-16 14:38                                   ` Stefan Monnier
2004-04-17  1:41                                     ` Kenichi Handa
2004-04-17 17:10                                       ` Stefan Monnier
2004-04-19  4:40                                         ` Kenichi Handa
2004-04-19 13:54                                           ` Stefan Monnier
2004-04-19 23:44                                             ` Kenichi Handa
2004-04-19 23:59                                               ` Miles Bader
2004-04-20  0:38                                                 ` Kenichi Handa
2004-04-12  4:33                               ` Stefan Monnier
2004-04-12 21:20                               ` Kim F. Storm
2004-04-13  1:30                                 ` Kenichi Handa
2004-04-13 10:37                                   ` Kim F. Storm
     [not found]                       ` <lorentey.g.e.devel.87brlx1wku.elte@eris.elte.hu>
2004-04-14 10:59                         ` Kim F. Storm
2004-04-14 22:53                           ` Richard Stallman
2004-04-15  1:19                             ` Kim F. Storm
2004-04-15 19:42                               ` Lőrentey Károly
2004-04-16 18:08                               ` Richard Stallman
2004-04-16 18:49                                 ` David Kastrup
2004-04-16 20:19                                   ` Display-local settings (was: It is time for a feature freeze) Stefan Monnier
2004-04-16 20:38                                     ` David Kastrup
2004-04-16 21:09                                       ` Stefan Monnier
2004-04-19 15:10                                       ` Display-local settings Lőrentey Károly
2004-04-19 17:49                                         ` Stefan Monnier
2004-04-20  4:48                                           ` Lőrentey Károly
2004-04-17 19:46                                   ` It is time for a feature freeze (it is NOW or never) Richard Stallman
2004-04-19 15:49                                   ` Display-local variables (Re: It is time for a feature freeze) Lőrentey Károly
2004-04-19 22:09                                     ` Kim F. Storm
2004-04-20  4:27                                       ` Lőrentey Károly
2004-04-20 10:18                                         ` Kim F. Storm
2004-04-15 18:18                           ` It is time for a feature freeze (it is NOW or never) Lőrentey Károly
2004-04-08  1:08               ` Compilation to native Richard Stallman
2004-04-08  1:31                 ` Kenichi Handa
2004-04-09 22:43                   ` Richard Stallman
2004-04-08  1:08           ` Richard Stallman
2004-04-13 23:12           ` Juri Linkov
2004-04-13 23:40             ` Kenichi Handa
2004-04-14  1:17               ` Juri Linkov
2004-04-14  1:54                 ` Kenichi Handa
2004-04-15 11:11                 ` Pure strings (Re: Compilation to native) Juri Linkov
2004-04-18 21:47                   ` Richard Stallman
2004-04-19  6:36                     ` Kenichi Handa
2004-04-19 14:20                       ` Stefan Monnier
2004-04-19 23:39                         ` Kenichi Handa
2004-04-19 18:20                       ` Richard Stallman
2004-04-20  1:00                         ` Kenichi Handa
2004-03-22 23:42     ` Compilation to native Matthew Mundell
2004-03-23 17:48       ` Richard Stallman
2004-03-23 22:43         ` David Kastrup [this message]
2004-03-24 23:52         ` Matthew Mundell
2004-03-30 22:18         ` Matthew Mundell
2004-03-30 22:30           ` David Kastrup
2004-03-31 18:58             ` Matthew Mundell
2004-03-30 23:31           ` Juri Linkov
2004-04-01  4:42             ` Richard Stallman
2004-04-01  4:42           ` Richard Stallman
2004-04-02 16:38             ` Matthew Mundell
2004-04-12 20:20           ` Matthew Mundell
2004-04-12 20:57             ` Stefan Monnier
2004-04-13 16:56               ` Matthew Mundell
2004-04-13 17:32                 ` Stefan Monnier
2004-04-13 19:03                   ` Matthew Mundell
2004-04-13 21:00                     ` Miles Bader
2004-04-13 21:50                       ` Miles Bader
2004-04-14 22:49                       ` Matthew Mundell
2004-04-16 14:22                       ` Matthew Mundell
2004-04-13 20:51                   ` Miles Bader
2004-04-16 14:21                     ` Matthew Mundell
2004-04-16 14:44                       ` Stefan Monnier
2004-04-16 15:06                         ` Matthew Mundell
2004-04-16 14:20                 ` Matthew Mundell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x5r7vjp4kv.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=matt@mundell.ukfsn.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).