unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Matthew Mundell <matt@mundell.ukfsn.org>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Compilation to native
Date: 31 Mar 2004 19:58:49 +0100	[thread overview]
Message-ID: <87wu50vo5y.fsf@sno.mundell.ukfsn.org> (raw)
In-Reply-To: x5isgmhsrr.fsf@lola.goethe.zz

David Kastrup <dak@gnu.org> writes:

> Matthew Mundell <matt@mundell.ukfsn.org> writes:
[...]
>
> > This is for the record, at least.  The speedup is a little better
> > with Fgtr inlined into the native, a few excess memory instructions
> > saved, and, where possible, objects passed between byte operations
> > using registers instead of the stack.
> >
> > Byte compiled:
> >   ("Tue Mar 30 21:54:05 2004" "Tue Mar 30 21:54:21 2004")  16 s
> >   ("Tue Mar 30 21:54:26 2004" "Tue Mar 30 21:54:42 2004")  16 s
> >   ("Tue Mar 30 21:54:45 2004" "Tue Mar 30 21:55:01 2004")  16 s
> >
> > Compiled from byte code to native:
> >   ("Tue Mar 30 21:55:43 2004" "Tue Mar 30 21:55:49 2004")  6 s
> >   ("Tue Mar 30 21:55:51 2004" "Tue Mar 30 21:55:58 2004")  7 s
> >   ("Tue Mar 30 21:56:01 2004" "Tue Mar 30 21:56:07 2004")  6 s
>
> This sounds impressive, but of course in real-life tasks the amount of
> work done by the Lisp interpreter as opposed to C primitives should be
> less.  One would have to see the memory impact as well to find out
> whether the overall gains in processing speed would remain as
> impressive.

Well, compiling to native creates a primitive.  Inlining in the
generated code causes a size increase in the same way as inlining does
in the static code.

The dynamic native example is about 1000 bytes.  An equivalent
primitive runs in under a second and is about 200 bytes.

Some of the differences in speed and size will be due to the way the
Lightning macros immediately write out instructions, compared to the c
compiler's use of an intermediate representation.

I think the rest comes down to how much work the dynamic compiler puts
into the compilation, and the information available at compile time
about the context of the Lisp code.  Perhaps passing variable type and
binding information to the compilers will improve the differences.  I
think Juri's reference to the CL declarations suggests this.

  reply	other threads:[~2004-03-31 18:58 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
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 [this message]
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=87wu50vo5y.fsf@sno.mundell.ukfsn.org \
    --to=matt@mundell.ukfsn.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.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).