From 917cbf2aba8b1d261173c9b80a9217817885f43e Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Tue, 4 Feb 2020 23:10:51 -0500 Subject: [PATCH] Speed up getting non-whitespace IFS characters. * gash/word.scm (split-fields): Compute 'char-set:ifs/nw' using 'string-delete' instead of 'char-set-difference'. --- gash/word.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gash/word.scm b/gash/word.scm index 26127ae..a06f87b 100644 --- a/gash/word.scm +++ b/gash/word.scm @@ -99,7 +99,7 @@ in the string @var{ifs}." (string->char-set ifs)) (define char-set:ifs/nw - (char-set-difference char-set:ifs char-set:whitespace)) + (string->char-set (string-delete char-set:whitespace ifs))) (define (wedge-apart-quote qword) (let loop ((qword (normalize-word qword)) (acc '()))