machine code vs. byte codes

Mark <jamess1@wwnet.com>
28 Mar 1999 17:08:19 -0500

          From comp.compilers

Related articles
machine code vs. byte codes jamess1@wwnet.com (Mark) (1999-03-28)
Re: machine code vs. byte codes ftu@fi.ruu.nl (1999-04-01)
Re: machine code vs. byte codes sdm7g@elvis.med.virginia.edu (Steven D. Majewski) (1999-04-03)
| List of all articles for this month |

From: Mark <jamess1@wwnet.com>
Newsgroups: comp.compilers
Date: 28 Mar 1999 17:08:19 -0500
Organization: USA Best Net
Keywords: interpreter, performance, practice, question

Hello,
        I'm working a compiler that compiles a very simple C-like language.
For the most part the source code will be compiled to byte codes and
interpreted, however certain parts can be compiled to machine code.
Performance is pretty critical in the app I'm working on and I was
wondering, would there be a significant advantage to using the machine
code? The code sections are fairly small and are basically just logic
operations, and math expressions. The one concern I have about using
machine code, is that I would have to port the compiler for each style
of CPU. If there isn't a huge performance benefit I'd rather use byte
codes.


Thanks,
Mark
[If each byte code does a lot of work, e.g., invert a matrix, the
overhead of interpreting is relatively low. If the byte codes are
simple, e.g., push a character onto the stack, the overhead is
horrible. If you don't want to write a code generator for each
architecture, the usual approach is to have your compiler translate
your language to C, then compile the C code. -John]



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.