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
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
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,