help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's the spec for emacs lisp virtual machine ?


From: mdj
Subject: Re: What's the spec for emacs lisp virtual machine ?
Date: Wed, 08 Dec 2010 15:21:58 -0000
User-agent: G2/1.0

On Jul 23, 4:12 pm, Fren Zeee <frenz...@gmail.com> wrote:
> Why is a VM needed when there is compiled C code running machine
> code ?

The are two essential reasons. Firstly, the bytecode is more compact
in memory than either the machine code or the READ lisp code.
Secondly, it loads a good deal faster from disk, allowing emacs to
start (relatively) quickly.

Thirdly, it is relatively straightforward to implement a portable
bytecode interpreter in C that will then compile on any architecture
for which one has a C compiler. This is a great deal less work than
developing a 'to-machine-code' compiler for every architecture out
there.

Keep in mind that the early releases of GNU Emacs were in the mid
1980's when personal computers powerful enough to run Emacs had
typically perhaps 1mb of RAM. Keeping the in-memory footprint of Emacs
small was more important than raw speed which would need more RAM, and
necessitate customizer the code generator for every conceivable
architecture.

In 1989 there were a LOT of 32bit microprocessor architectures out
there, and many still survive to this day.

To answer the rest of your questions, I'd recommend enrolling in a
good computer science degree.

Matt


reply via email to

[Prev in Thread] Current Thread [Next in Thread]