[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why it is necessary to compile el files?
From: |
David Hansen |
Subject: |
Re: Why it is necessary to compile el files? |
Date: |
Sat, 29 Sep 2007 17:48:17 +0200 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) |
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