benchmark.regex-dna: We have to read the input and output files with \n

line endings.
master
Doug Coleman 2020-04-12 11:23:38 -07:00
parent 4a48297387
commit 899c388ca7
1 changed files with 2 additions and 1 deletions

View File

@ -44,8 +44,9 @@ IN: benchmark.regex-dna
SYMBOL: ilen
SYMBOL: clen
! Make sure we read the file with \n as the newline delimiter.
: regex-dna ( file -- )
ascii file-contents dup length ilen set
ascii file-lines [ "\n" append ] map concat dup length ilen set
strip-line-breaks dup length clen set
dup count-patterns
do-replacements