From d157fe1306267caa489a70dd176593873445820b Mon Sep 17 00:00:00 2001 From: Brooke Vibber Date: Sat, 4 Jan 2025 10:06:12 -0800 Subject: [PATCH] Faster pixel skipping on 4x4, 2x2 tiers Iterate at fill_masks[fill_level]+1 instead of every pixel and then skipping, saves a smidge of time view 1 with expanded memory: 10.514 ms/px before 10.430 ms/px after --- mandel.s | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/mandel.s b/mandel.s index 6be37d2..210799a 100644 --- a/mandel.s +++ b/mandel.s @@ -1737,12 +1737,15 @@ update_status: skipped: + ; sx += fill_level[fill_masks] + 1 + ldx fill_level + lda fill_masks,x clc - lda sx - adc #1 + adc #1 ; will never carry + adc sx sta sx - lda sx + 1 - adc #0 + lda #0 + adc sx + 1 sta sx + 1 lda sx @@ -1752,12 +1755,15 @@ skipped: loop_sx_done: + ; sy += fill_level[fill_masks] + 1 + ldx fill_level + lda fill_masks,x clc - lda sy - adc #1 + adc #1 ; will never carry + adc sy sta sy - lda sy + 1 - adc #0 + lda #0 + adc sy + 1 sta sy + 1 lda sy