Related articles |
---|
How long does it take to build a compiler? ywlee@sparc0a.cs.uiuc.edu (Youngwhan Lee) (1993-10-27) |
Re: How long does it take to build a compiler? lenngray@netcom.com (1993-10-29) |
Re: How long does it take to build a compiler? bj@hatch.socal.com (1993-10-30) |
Re: How long does it take to build a compiler? ywlee@sparc0a.cs.uiuc.edu (Youngwhan Lee) (1993-11-01) |
Re: How long does it take to build a compiler? ryer@dsd.camb.inmet.com (1993-11-01) |
Re: How long does it take to build a compiler? neitzel@ips.cs.tu-bs.de (1993-11-04) |
Re: How long does it take to build a compiler? graham@pact.srf.ac.uk (1993-11-05) |
Re: How long does it take to build a compiler? xjam@ginkgo.CS.Berkeley.EDU (1993-11-09) |
Re: How long does it take to build a compiler? pardo@cs.washington.edu (1993-11-09) |
Re: How long does it take to build a compiler? maniattb@cs.rpi.edu (1993-11-10) |
Newsgroups: | comp.compilers |
From: | graham@pact.srf.ac.uk (Graham Matthews) |
Keywords: | interpreter, performance, comment |
Organization: | University of Bristol, England |
Original-Sender: | usenet@bris.ac.uk (Usenet news owner) |
References: | 93-10-124 |
Date: | Fri, 5 Nov 1993 10:22:32 GMT |
Youngwhan Lee (ywlee@sparc0a.cs.uiuc.edu) wrote:
: I run a tiny software company and the company has built an object library
: using c++ on DOS. Now, I want to build a compiler on top of it.
: ...I need to estimate the time period for the project.
The Moderator:
: [You need to define your question better. For example, do you ...
: want to compile into some intermediate code and interpret it, which is
: considerably easier.
Another myth! Simple interpreters can be built very quickly, but building
a sophisticated interpreter takes just as long, if not longer than
building a compiler. Building a sophisticated interpreter usually involves
all the same work as a compiler (code generation, object file management,
linking, etc) but for a virtual machine rather than an actual machine.
Because your virtual machine is usually simpler than a real machine these
tasks are usually easier for the interpreter writer. BUT the interpreter
writer has to spend a lot of time designing a good virtual machine set -
one that is fast and tuned to his language. This takes a lot of work to
get right. You need to profile your virtual machine, look for common
instruction sequences to make into macro-instructions, etc. In addition if
you are trying to ensure a high performance implementation (something that
is much more important in an interpreter than a compiler) you need to be
very very careful about how you code your interpeter itself.
In short I think the time to build a compiler/interpreter depends largely
on the quality you expect from it. Build high quality implementations with
lots of friendly facilites, and that run fast, takes a lot of time and
effort, regardless of whether its a compiler or interpreter.
graham
--
[No question, building the runtime system is about as hard either way. But
not going to native code can avoid painful interactions with low-level
linker and operating system features that you have to handle if you want your
machine code to be loadable like everyone else's. Re performance, it turns
out that in this case the language in question is a stat package, so I'd
guess that the time taken either way would be dominated by routines in the
library that do the actual work. -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.