all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Why it is necessary to compile el files?
@ 2007-09-29  2:48 Ke Lu
  2007-09-29  5:42 ` ken
  2007-09-29 15:48 ` David Hansen
  0 siblings, 2 replies; 3+ messages in thread
From: Ke Lu @ 2007-09-29  2:48 UTC (permalink / raw)
  To: help-gnu-emacs

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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Why it is necessary to compile el files?
  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
  1 sibling, 0 replies; 3+ messages in thread
From: ken @ 2007-09-29  5:42 UTC (permalink / raw)
  To: GNU Emacs List

On 09/28/2007 10:48 PM 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 really isn't *necessary*.  The byte compiled elisp files will simply
run faster, but perhaps not enough that human senses will detect a speed
increase.

If you're running a *nix system, you could do

$ time emacs -batch -f test.el

(or something like that) and then the same on test.elc and it will show
the execution speed of each test file.


-- 
The whole problem with the world is that fools and fanatics are always
so certain of themselves, and wiser people so full of doubts.
            - Bertrand Russell, philosopher, mathematician, author,
              Nobel laureate (1872-1970)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Why it is necessary to compile el files?
  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
  1 sibling, 0 replies; 3+ messages in thread
From: David Hansen @ 2007-09-29 15:48 UTC (permalink / raw)
  To: help-gnu-emacs

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-09-29 15:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

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.