Hi, Neil Jerram <[EMAIL PROTECTED]> writes:
> I have no technical objection to your patch, but I'm afraid you must > be missing something, or else there is something special about the > environment that you were measuring in. I have played with a few > TCP-based Guile applications (including the Emacs debugging interface) > and not noticed any obvious performance problem. I tried the attached script, both with and without the patch. Here, it says "time: 7" with the patch and "time: 2645" without. Now, it seems that I was observing an even higher difference because the Guile server script was running under `strace'... :-) Thanks, Ludovic.
(use-modules (srfi srfi-4)) (define %port 7778) (define %size 5000000) (define (time thunk) (let ((start (get-internal-run-time))) (thunk) (let ((end (get-internal-run-time))) (format #t "time: ~a~%" (- end start))))) (if (= 0 (primitive-fork)) (let ((s (socket PF_INET SOCK_STREAM 0))) (bind s AF_INET INADDR_LOOPBACK %port) (listen s 1024) (format #t "accepting connections...~%") (let* ((accepted (accept s)) (port (car accepted)) (vec (make-u8vector %size))) (time (lambda () (uniform-vector-read! vec port))) (close-port port))) (let ((s (socket PF_INET SOCK_STREAM 0)) (vec (make-u8vector %size))) (format #t "client~%") (sleep 1) (connect s AF_INET INADDR_LOOPBACK %port) (format #t "writing...~%") (uniform-vector-write vec s) (format #t "done.~%") (close-port s)))
_______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel