[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Chicken vs Perl
From: |
Sascha Ziemann |
Subject: |
Re: [Chicken-users] Chicken vs Perl |
Date: |
Tue, 20 Sep 2011 17:24:50 +0200 |
2011/9/20 Sascha Ziemann <address@hidden>:
>
> $ dd if=/dev/zero bs=1M count=100 | od -xv | cat.scm > /dev/null
> 100+0 records in
> 100+0 records out
> 104857600 bytes (105 MB) copied, 36.9156 s, 2.8 MB/s
>
> With cat.scm being this:
>
> #! /usr/local/bin/csi -s
>
> (let next-line ((line (read-line)))
> (if (not (eof-object? line))
> (begin
> (printf "~a\n" line)
> (next-line (read-line)))))
>
printf seems to be quite slow. display and newline perform much better:
104857600 bytes (105 MB) copied, 14.7021 s, 7.1 MB/s
Gambit-C isn't better either:
104857600 bytes (105 MB) copied, 18.9284 s, 5.5 MB/s
- Re: [Chicken-users] Chicken vs Perl, (continued)