On Friday, April 4, 2003, 12:10:00 AM, Dan wrote: >>So it seems that Perl is significantly faster in this simple test, but also >>the block/yield approach does not by itself add a great deal of overhead >>(fortunately!) > Be aware that perl cheats unmercifully at IO, to the extent of > peeking beneath the C IO library hood and acting directly on the > underlying buffer structure. While somewhat evil (okay, it's very > evil) it does cut out at least one level of function calls for IO, > and speeds things up some. Interesting. In what way is it so evil, given that Perl successfully runs on many platforms. And why is such evilness even necessary, given that the C IO libraries should already be as fast as possible? If it's just "cutting out at least one level of function call", then that function call must be in a pretty tight loop to make any difference, suggesting that the C IO libraries are not in fact optimised. And, as an experienced Perl internals hacker, do you have any suggestion for speeding up Ruby's IO? Cheers, Gavin