all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Hansen <david.hansen@gmx.net>
To: help-gnu-emacs@gnu.org
Subject: Re: Why it is necessary to compile el files?
Date: Sat, 29 Sep 2007 17:48:17 +0200	[thread overview]
Message-ID: <87lkapscam.fsf@localhorst.mine.nu> (raw)
In-Reply-To: m3hclei3ve.fsf@www.luxdo.jp

On Sat, 29 Sep 2007 11:48:05 +0900 Ke Lu wrote:

> Why it is necessary to compile el files?
>
> I can't fell it become faster after compile el files.
> I often install emacs package without make and just
> add load script which like following
> (add-to-list 'load-path "path-of-package")
> (require 'xxx)
>
> I think it makes things easy.
>
> I want to know Why it is necessary to compile el files?
> If it makes the speed up,How can I feel it?

It's not necessary, but it definitively speeds up things (especially
when macros are involved):

,----[ tst.el ]
| (eval-when-compile (require 'cl))
| (dotimes (i 1000000)
|   (let ((foo '()))
|     (push 'bar foo)
|     (pop foo)))
`----

$ time emacs -Q -batch -l tst.el

real    0m14.360s
user    0m14.109s
sys     0m0.124s

$ time emacs -Q -batch -l tst.elc

real    0m0.948s
user    0m0.936s
sys     0m0.008s

But this is a rather drastic example.

David

      parent reply	other threads:[~2007-09-29 15:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-29  2:48 Why it is necessary to compile el files? Ke Lu
2007-09-29  5:42 ` ken
2007-09-29 15:48 ` David Hansen [this message]

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

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

  git send-email \
    --in-reply-to=87lkapscam.fsf@localhorst.mine.nu \
    --to=david.hansen@gmx.net \
    --cc=help-gnu-emacs@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.