pointfree has quit [Read error: Connection reset by peer]
pointfree has joined #forth
WickedShell has quit [Remote host closed the connection]
routeveg has quit [Ping timeout: 260 seconds]
routeveg has joined #forth
boru` has joined #forth
boru has quit [Disconnected by services]
boru` is now known as boru
alexshpilkin has quit [Ping timeout: 260 seconds]
_whitelogger has joined #forth
_whitelogger has joined #forth
Zarutian_HTC has quit [Remote host closed the connection]
_whitelogger has joined #forth
gravicappa has joined #forth
cp- has quit [Ping timeout: 272 seconds]
cp- has joined #forth
cp- has quit [Ping timeout: 260 seconds]
cp- has joined #forth
dave0 has quit [Read error: Connection reset by peer]
dave0 has joined #forth
<siraben>
phew, finally understood how to compile a small typed functional language to C using closure conversion, lambda lifting, and SSA!
<siraben>
not sure if the techniques needed to target a stack machine would be much different
<siraben>
it's probably better to do register spilling to ensure that every subexpression doesn't have more than n free variables, where n is the number of registers
<MrMobius>
siraben, let us know what you find. I've always thought that was one of the main things that doomed stack machines to being so much slower than register machines
xek has joined #forth
dave0 has quit [Quit: dave's not here]
proteusguy has quit [Ping timeout: 265 seconds]
proteus-guy has quit [Ping timeout: 260 seconds]
proteusguy has joined #forth
proteus-guy has joined #forth
Zarutian_HTC has joined #forth
<siraben>
MrMobius: sure
<siraben>
from what I've read, the biggest problem with stack machines is that when the stack gets large, it usually spills over into slower memory. with enough registers this doesn't happen
<siraben>
OTOH if you're register constrained, like the Z80, it may not be as much of a difference (it's still costs more cycles to load from RAM though), given that modern CPUs have dozens of registers the gap is now large, I think
xek has quit [Quit: Leaving]
<MrMobius>
siraben, hmm, just thinking about it, the problem wouldnt seem to be large stacks since you need to spill anyway with a register machine when it gets large
<MrMobius>
I mean something like this: FOO @ IF 5 THEN
<MrMobius>
you're only using one level of stack but you have to spill registers
<siraben>
right
<siraben>
but if you're only using X amount of stack at any moment, might as well be a register machine, no?
<MrMobius>
no
<MrMobius>
if your registers are faster than stack memory, then FOO @ IF 5 THEN will be slower than the equivalent code meant for a register machine since it doesn't have to spill anything
<MrMobius>
since a lot of the speed up or register machines seems to be keeping as much as you can in registers and accessing memory as little as necessary
<siraben>
Right
<siraben>
in FOO @ IF 5 THEN, there's a memory read, though
<MrMobius>
sure but let's assume there's also a memory read in the register machine to make it equal
<siraben>
mov [FOO], reg1; cmp 5, reg1; jeq LBL
<siraben>
something liek that
<MrMobius>
not knowing the size of the stack means you have to spill registers
<siraben>
s/liek/like
<siraben>
Yeah
<siraben>
be back later, got some differential equations homework to do.
Zarutian_HTC has quit [Ping timeout: 240 seconds]
WickedShell has joined #forth
gravicappa has quit [Ping timeout: 256 seconds]
Zarutian_HTC has joined #forth
gravicappa has joined #forth
gravicappa has quit [Ping timeout: 256 seconds]
gravicappa has joined #forth
proteus-guy has quit [Ping timeout: 240 seconds]
proteus-guy has joined #forth
gravicappa has quit [Ping timeout: 240 seconds]
Zarutian_HTC has quit [Remote host closed the connection]
Zarutian_HTC has joined #forth
arrdem has quit [Ping timeout: 260 seconds]
arrdem has joined #forth
Zarutian_HTC1 has joined #forth
Zarutian_HTC has quit [Read error: Connection reset by peer]
dave0 has joined #forth
arrdem has quit [Ping timeout: 240 seconds]
guan has quit [Read error: Connection reset by peer]
mjl has quit [Read error: Connection reset by peer]
guan has joined #forth
ovf has quit [Ping timeout: 260 seconds]
arrdem has joined #forth
mjl has joined #forth
ovf has joined #forth
dave0 has quit [Read error: Connection reset by peer]