From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: mdj Newsgroups: gmane.emacs.help Subject: Re: What's the spec for emacs lisp virtual machine ? Date: Thu, 29 Jul 2010 20:51:11 -0700 (PDT) Organization: http://groups.google.com Message-ID: <90d69edf-4e56-4642-ae45-5b987934cf0b@q16g2000prf.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1291853388 19087 80.91.229.12 (9 Dec 2010 00:09:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2010 00:09:48 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 09 01:09:45 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQU4u-0004nK-QZ for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 01:09:44 +0100 Original-Received: from localhost ([127.0.0.1]:44717 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQU4t-0006Fs-Uy for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 19:09:44 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!q16g2000prf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.lang.lisp Original-Lines: 29 Original-NNTP-Posting-Host: 165.228.177.83 Original-X-Trace: posting.google.com 1280461871 14551 127.0.0.1 (30 Jul 2010 03:51:11 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 30 Jul 2010 03:51:11 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: q16g2000prf.googlegroups.com; posting-host=165.228.177.83; posting-account=gKwMEAoAAACgdZoRArZlfcCSOA8KWMxg User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100726 CentOS/3.6-3.el5.centos Firefox/3.6.7,gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:180214 comp.lang.lisp:290648 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:76270 Archived-At: On Jul 23, 4:12=A0pm, Fren Zeee 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