optimise examples/rule110.mcl to match C speed

This commit is contained in:
MCorange 2023-03-18 19:06:03 +02:00
parent 8421fbf379
commit c34a09fc7a

View File

@ -3,18 +3,16 @@ mem 98 + 1 @8
0 while dup 98 < do
0 while dup 100 < do
dup mem + !8 if
mem 100 + 42 @8
dup mem + 100 + 42 @8
else
mem 100 + 32 @8
dup mem + 100 + 32 @8
end
1 mem 100 + 1 1 syscall3 drop
1 +
end
drop
mem 100 + 10 @8
1 mem 100 + 1 1 syscall3 drop
mem + 100 + 10 @8
101 mem 100 + 1 1 syscall3 drop
// pattern
mem !8 1 shl