39% speed increase from optimizer!

This commit is contained in:
SpookyDervish
2025-09-09 18:03:58 +10:00
parent ab207d982c
commit e137cb88ae
3 changed files with 16 additions and 9 deletions

BIN
out

Binary file not shown.

15
out.asm
View File

@@ -5,11 +5,14 @@ section .text
global _start global _start
_start: _start:
push 0 push 0
mov rax, 1000 push 1
cmp rax, [rsp + 0] .loop:
setg al mov rax, [rsp + 8]
movzx rax, al add rax, 1
push rax mov QWORD [rsp + 8], rax
mov rax, 100000000
cmp rax, [rsp + 8]
jg .loop
mov rax, 60 mov rax, 60
mov rdi, [rsp + 0] mov rdi, 0
syscall syscall

View File

@@ -1,3 +1,7 @@
set &var 0 set &counter 0
greater 1000 $var &cond set &cond 1
end $cond @loop
add $counter 1 &counter
greater 100000000 $counter &cond
if $cond %loop
end 0