Programming language shootout: sum file

From Gambit wiki

This is a Gambit implementation of the sum-file benchmark of the Computer Language Benchmarks Game.

I have no idea what the real data is supposed to be.

The program


;; The Computer Language Benchmarks Game
;; Derived by Bradley Lucier from the Ikarus variant
;; derived by Michael D. Adams from the MzScheme variant

(declare (standard-bindings)(extended-bindings)(block)(not safe))

(define (main)
  (time (let ([in (current-input-port)])
    (let loop ([acc 0])
      (let ([n (read-line in)])
	(if (eof-object? n)
	    (begin (display acc) (newline))
	    (loop (+ acc (string->number n)))))))))


gsc sum-file


gsi sum-file <