From 49ffb1065bc9ec2335e621eba2c025eb01cf5a3a Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Mon, 26 Feb 2024 22:14:59 -0600 Subject: [PATCH] Unroll the core loop of strlen one time. This makes the core loop about 10% faster at the cost of 5 extra code bytes, which seems like a reasonable tradeoff. --- string.asm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/string.asm b/string.asm index e382f43..d2c1147 100644 --- a/string.asm +++ b/string.asm @@ -961,6 +961,9 @@ str equ 4 pointer to the string tyx null short M lb1 lda [str],Y + beq lb2 + iny + lda [str],Y beq lb2 iny bne lb1