The JITC is now officialy time tested. And quite frankly, without say
another four months of work, it's not going to beat the interpreter (which
is already quite fast) Note only that, it takes six minutes to compile the
one 7K file which contains it. Ouch. And it does not even get the right
answers.

Due to the vast number of cross-TOC calls, memory accesses, and
instruction-cache reloads, it actually runs slower than the interpreter.
Yes, the cross-TOC calls, memory accesses, and cache reloads could be
eliminated, in which case it would beat the interpreter. And finding the
evaluation bug would be nice, too.

But this would require:
        some serious MacsBug work to find the bug (I could do that...)
        a register allocator
        a complete analysis of the HT code, keeping track of variable types
                & usage.
        and more

I think right now we need to get OpenCard off the ground; we don't have
four months to wait around while I try to get together a nice compiler.

I'm going back to working on the plain 'ol interpreter, which still kicks
HyperCard's, Surf's, and SuperCard's collective rear ends. I'm not sure
about MC.

Besides, the JITC is such a mess that it'd probably get Uli to hire an
asassin for me. I'll put it in the archive folder of the next snapshot;
anyone wishing to tinker with it may.

There is still quite abit that could be done for the interpreter, including
optimizations which could probably double its speed in certain cases.




Anyway, there is some good news. In addition to the normal:

OpenTalk:
put 0 into x
put 0 into y
add 2 to x
add 1.1*x to y
add x to x
repeat 100000
        add (x*x)-(x*x)+1 to x
end repeat
add x to y


Disassembled Tokens:
LOAD 0 INTO VAR[0]
LOAD 0 INTO VAR[1]
ADD 2 TO VAR[0]
LOAD 1.10000 INTO VAR[2]
LOAD VAR[0] INTO VAR[3]
MULTIPLY VAR[3] WITH-INTO VAR[2]
ADD VAR[2] TO VAR[1]
ADD VAR[0] TO VAR[0]
LOAD 100000 INTO VAR[2]
PUSH_PC
LOAD VAR[0] INTO VAR[3]
LOAD VAR[0] INTO VAR[4]
MULTIPLY VAR[4] WITH-INTO VAR[3]
LOAD VAR[0] INTO VAR[4]
LOAD VAR[0] INTO VAR[5]
MULTIPLY VAR[5] WITH-INTO VAR[4]
ADD -VAR[4] TO VAR[3]
LOAD 1 INTO VAR[4]
ADD VAR[4] TO VAR[3]
ADD VAR[3] TO VAR[0]
PEEKDEC_PC VAR[2]
ADD VAR[0] TO VAR[1]


SUMMARY:
Variables (including temps): 6
Bytes: 123 -> 116

Now running...
VAR[0] is 100004
VAR[1] is 100006
VAR[2] is 0
VAR[3] is 1
VAR[4] is 1
VAR[5] is 100003
Time to execute tokenized version and output vars,
in ticks: 65

Execution complete. Have a good day.


There is now:
OpenTalk:
put 0 into x
put 0 into y
add 2 to x
add 1.1*x to y
add x to x
repeat 100000
        add (x*x)-(x*x)+1 to x
end repeat
add x to y


Disassembled Tokens:
LOAD 0 INTO VAR[0]
LOAD 0 INTO VAR[1]
ADD 2 TO VAR[0]
LOAD 1.10000 INTO VAR[2]
LOAD VAR[0] INTO VAR[3]
MULTIPLY VAR[3] WITH-INTO VAR[2]
ADD VAR[2] TO VAR[1]
ADD VAR[0] TO VAR[0]
LOAD 100000 INTO VAR[2]
PUSH_PC
LOAD VAR[0] INTO VAR[3]
LOAD VAR[0] INTO VAR[4]
MULTIPLY VAR[4] WITH-INTO VAR[3]
LOAD VAR[0] INTO VAR[4]
LOAD VAR[0] INTO VAR[5]
MULTIPLY VAR[5] WITH-INTO VAR[4]
ADD -VAR[4] TO VAR[3]
LOAD 1 INTO VAR[4]
ADD VAR[4] TO VAR[3]
ADD VAR[3] TO VAR[0]
PEEKDEC_PC VAR[2]
ADD VAR[0] TO VAR[1]


SUMMARY:
Variables (including temps): 6
Bytes: 123 -> 116

Now running...
VAR[0] is 100004
VAR[1] is 100006
VAR[2] is 0
VAR[3] is 1
VAR[4] is 1
VAR[5] is 100003
Time to execute tokenized version and output vars,
in ticks: 2937

Execution complete. Have a good day.

Now, your probably wondering why I think this is good. After all, it's 49
seconds instead of one. The difference is the machine it's running on: A
PowerBase 200 vs. an LCIII. Yep, we've not got a 68K version, too! A lot of
work to get it though, with all the bugs in SCpp!

Reply via email to