[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: VM: direct vs indirect threading
From: |
Keisuke Nishida |
Subject: |
Re: VM: direct vs indirect threading |
Date: |
21 Sep 2000 02:35:03 -0400 |
User-agent: |
T-gnus/6.14.4 (based on Gnus v5.8.6) (revision 02) SEMI/1.13.7 (Awazu) Chao/1.14.0 (Momoyama) Emacs/20.7 (i686-pc-linux-gnu) MULE/4.1 (AOI) |
address@hidden (Karl M. Hegbloom) writes:
> Keisuke? Have you looked at `rscheme' at all? (It's very
> complicated, to me.) Apparently it has some sort of automatic
> generation of byte code interpreters. Might be worth a study.
No. I want to look at it, but their ftp server is not working now.
Where could I find the source code?
> Did you find anything interesting on CiteSeer?
I briefly looked at an article "Optimizing direct threaded code by
selective inlining" (http://www-sor.inria.fr/publi/ODCSI_pldi98.html).
They says they does direct threading and inlining (combining several
instructions) dynamically. My compiler does these at compile time.
I think direct threading has been done in my VM.
On the other hand, my VM consumes 4 times as much memory as indirect
threading interpreter. If indirect threading is done sufficiently
fast, I will modify my VM so that it uses indirect threading, still
using computed-gotos:
unsigned char *ip;
void *label_table[256] = {&&l_nop, ...};
#define NEXT goto *label_table[*++ip]
It seems rep uses this technique, and I think this better fits for
my VM. It's simple, uses less memory, simplifies the instruction set,
and makes the debugging engine as fast as the regular engine. Great!
> * Notes:
> * This bytecode interpreter is hand-crafted. In the future,
> * BCIs can be constructed automatically using trace-driven
> * instruction-sequence analysis for optimization.
Sounds interesting. I thought the same thing, but it requires
re-compilation of the interpreter. I think hand-craft is okay.
JIT compiler is more attractive to me. Dan is working on it with
his new QScheme.
Anyway, these optimization issues can be done any time later.
I need to complete the VM and the compiler first...
-- Kei
- Re: Octave and Guile?, Nicolas Neuss, 2000/09/14
- Re: Octave and Guile?, Richard Stallman, 2000/09/14
- Message not available
- Message not available
- Message not available
- VM: direct vs indirect threading, Karl M. Hegbloom, 2000/09/19
- Re: VM: direct vs indirect threading, Keisuke Nishida, 2000/09/19
- Re: VM: direct vs indirect threading, Karl M. Hegbloom, 2000/09/19
- Re: VM: direct vs indirect threading, Karl M. Hegbloom, 2000/09/19
- Re: VM: direct vs indirect threading, Karl M. Hegbloom, 2000/09/20
- Re: VM: direct vs indirect threading,
Keisuke Nishida <=
- Re: VM: direct vs indirect threading, Karl M. Hegbloom, 2000/09/21
- Re: VM: direct vs indirect threading, Karl M. Hegbloom, 2000/09/19
- Re: VM: direct vs indirect threading, Keisuke Nishida, 2000/09/19
- RE: Octave and Guile?, Daschbach, John L, 2000/09/14
- Re: Octave and Guile?, Michael Vanier, 2000/09/14
- Re: Octave and Guile?, Marius Vollmer, 2000/09/17
- RE: Octave and Guile?, Daschbach, John L, 2000/09/18
- Re: Octave and Guile?, Karl M. Hegbloom, 2000/09/19