| 1 | (define ascii-input (make-string 4099 #\a)) |
| 2 | (define (benchmark seed) |
| 3 | (let ((limit (+ 4096 seed))) |
| 4 | (let loop ((n 0) (acc 0)) |
| 5 | (if (= n limit) acc |
| 6 | (loop (+ n 1) (+ acc (char->integer (string-ref ascii-input n)))))))) |
| 7 | (define (run-batch count) |
| 8 | (let loop ((left count) (seed 0)) |
| 9 | (if (= left 0) 397312 |
| 10 | (if (= (benchmark seed) (if (= seed 0) 397312 (if (= seed 1) 397409 (if (= seed 2) 397506 397603)))) |
| 11 | (loop (- left 1) (if (= seed 3) 0 (+ seed 1))) #f)))) |
| 12 |