|How long does it take to build a compiler? email@example.com (Youngwhan Lee) (1993-10-27)|
|Re: How long does it take to build a compiler? firstname.lastname@example.org (1993-10-29)|
|Re: How long does it take to build a compiler? email@example.com (1993-10-30)|
|Re: How long does it take to build a compiler? firstname.lastname@example.org (Youngwhan Lee) (1993-11-01)|
|Re: How long does it take to build a compiler? email@example.com (1993-11-01)|
|Re: How long does it take to build a compiler? firstname.lastname@example.org (1993-11-04)|
|Re: How long does it take to build a compiler? email@example.com (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? firstname.lastname@example.org (1993-11-09)|
|Re: How long does it take to build a compiler? email@example.com (1993-11-10)|
|From:||firstname.lastname@example.org (Graham Matthews)|
|Keywords:||interpreter, performance, comment|
|Organization:||University of Bristol, England|
|Original-Sender:||email@example.com (Usenet news owner)|
|Date:||Fri, 5 Nov 1993 10:22:32 GMT|
Youngwhan Lee (firstname.lastname@example.org) 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.
: [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.
[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
Search the comp.compilers archives again.