From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Fren Zeee Newsgroups: gmane.emacs.help Subject: Re: What's the spec for emacs lisp virtual machine ? Date: Thu, 29 Jul 2010 22:01:33 -0700 (PDT) Organization: http://groups.google.com Message-ID: <80cc90dc-d66b-4d93-9ff9-dccacec01770@c10g2000yqi.googlegroups.com> References: <90d69edf-4e56-4642-ae45-5b987934cf0b@q16g2000prf.googlegroups.com> 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 1291853572 19952 80.91.229.12 (9 Dec 2010 00:12:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2010 00:12:52 +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:12:48 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 1PQU7r-0006Dn-MK for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 01:12:47 +0100 Original-Received: from localhost ([127.0.0.1]:47283 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQU7q-0007jI-QW for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 19:12:47 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!c10g2000yqi.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.lang.lisp Original-Lines: 48 Original-NNTP-Posting-Host: 75.31.76.168 Original-X-Trace: posting.google.com 1280466093 18707 127.0.0.1 (30 Jul 2010 05:01:33 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 30 Jul 2010 05:01:33 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: c10g2000yqi.googlegroups.com; posting-host=75.31.76.168; posting-account=Xy1x0QoAAAC1_8XWVbTILoO5VL5JMCDm User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; {83B3ACED-AC9F-2058-FD69-DBCDCD722B97}; (R1 1.5)),gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:180215 comp.lang.lisp:290649 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:76275 Archived-At: On Jul 29, 8:51=A0pm, mdj wrote: > 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. an example preferably from an emacs file from savannah link so one could get an idea of the animal. theoretical reasons for speed ? > 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. Why is it less than porting the C compiler ? How would it be written ? assembler ? > 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. I am sure someone can point to a tutorial paper or book, no one need you to give that obvious advice ... so obvious that i consider rude > Matt