From 420f930d45fc505dde3529c1414c62cb5e63d21b Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Wed, 18 Nov 2015 19:14:16 +0100 Subject: [PATCH 2/3] Avoid CPS call in read-char to read-char/port. This should improve performance somewhat for those cases where the procedure is called indirectly, or with zero arguments. This fixes the remaining part of #1219. --- library.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library.scm b/library.scm index 377c882..18d1195 100644 --- a/library.scm +++ b/library.scm @@ -2297,7 +2297,8 @@ EOF ((##sys#slot (##sys#slot port 2) 6) port) ) ; char-ready? (define (read-char #!optional (port ##sys#standard-input)) - (##sys#read-char/port port) ) + (##sys#check-input-port port #t 'read-char) + (##sys#read-char-0 port) ) (define (##sys#read-char-0 p) (let ([c (if (##sys#slot p 6) -- 2.1.4