Is Scheme shell slow or is it me ?
Hi,
I have some scripts for which bash is too slow. I thought it would be a nice idea to try scsh for it. I just picked some lines from their manual, so I might be missing out on something, but to me it seems extremely slow. I have tried to copy half a million empty files from one directory to the other.The first 20000 or so take 20 secs on my old PC to complete with bash. With scsh it takes four times as long. Using directory-strings and for-each, I just get the first 100,000 names, and the loop crashes at 20,000 or so, after 1 min 20 secs. An earlier test took ages, but at least got to 75000 files. So I tried a straight loop like this: (define (cpy f) (run (cp ,f "copies"))) (do ((it 0 (+ it 1))) ((> it 20000)) (cpy (string-append "file" (number->string it)))) This crashes at 20.000 as well. Using (define (loop it itend) (cond ((< it itend) (begin (cpy (string-append "files" (number->string it))) (loop (+ it 1) itend ) )))) crashes after 500 files, even. What am I doing wrong here ?? cheers |
Quote:
|
Quote:
It must be that scheme shell is buggy. Pity, I had the impression it was something I would like. Code:
#################### |
Quote:
Code:
find . -maxdepth 1 -name 'file*' -print0 | xargs -0 cp -t copies Quote:
|
All times are GMT -5. The time now is 03:38 AM. |