+
+\f
+(with-benchmark-prefix "rdelim"
+
+ (let-syntax ((sequence (lambda (s)
+ ;; Create a sequence `(begin EXPR ...)' with
+ ;; COUNT occurrences of EXPR.
+ (syntax-case s ()
+ ((_ expr count)
+ (number? (syntax->datum #'count))
+ (cons #'begin
+ (make-list
+ (syntax->datum #'count)
+ #'expr)))))))
+ (let ((str (string-concatenate
+ (make-list 1000 "one line\n"))))
+ (benchmark "read-line" 1000
+ (let ((port (with-fluids ((%default-port-encoding "UTF-8"))
+ (open-input-string str))))
+ (sequence (read-line port) 1000))))))