[Chicken-users] Performance of write-char (and I/O in general)

2010-03-25 Thread Jeronimo Pellegrini
Hello, I recently noticed that reading numbers from a file was much slower from compiled Chicken using the read procedure than if I used fscanf directly from the FFI. (The thread is Getting C file handle from port?). Anyway, I understand that the standard read procedure will perform some checks

Re: [Chicken-users] Performance of write-char (and I/O in general)

2010-03-25 Thread Jeronimo Pellegrini
I forgot to mention: this is with git master/HEAD (4cbc9d250a5f2a60a4526ad1435c13a1d605cef4). J. On Thu, Mar 25, 2010 at 11:32:46AM -0300, Jeronimo Pellegrini wrote: Hello, I recently noticed that reading numbers from a file was much slower from compiled Chicken using the read procedure

Re: [Chicken-users] Performance of write-char (and I/O in general)

2010-03-25 Thread Jim Ursetto
gcc is smarter than you think. Compare the assembly output of the two and you will find the fprintf call without the IF check is optimized into an fputc. - movl$97, (%esp) - call_fputc + movl(%edi), %eax + movl4(%eax), %eax + movl%eax,