make sieve conform to the standard benchmark

This commit is contained in:
davidly 2024-07-05 06:05:35 -07:00
parent 25a6dde172
commit 27288dc13f

View File

@ -8,7 +8,7 @@
(setq i 0) (setq i 0)
(setq count 0) (setq count 0)
_nexti_ _nexti_
(cond ((< i size) (cond ((<= i size)
(a t i) (a t i)
(setq i (add1 i)) (setq i (add1 i))
(go _nexti_)) (go _nexti_))
@ -16,13 +16,13 @@
(setq i 0) (setq i 0)
_nexti2_ _nexti2_
(cond ((< i size) (cond ((<= i size)
(cond ((a i) (cond ((a i)
(setq prime (+ i i 3)) (setq prime (+ i i 3))
(setq k (+ i prime)) (setq k (+ i prime))
(prog () (prog ()
_nextk_ _nextk_
(cond ((< k size) (cond ((<= k size)
(a nil k) (a nil k)
(setq k (+ k prime)) (setq k (+ k prime))
(go _nextk_)) (go _nextk_))