At 21:37 20.10.99 +0100, Brian J. Beesley wrote:
>But I can write an entire array of any
>size with one call from a high-level language, whereas writing it
>byte by byte takes as many calls as there are bytes in the array.
>Given that the system call is likely to involve a processor context
>save & restore and a switch from user to kernel privelege & back
>again, I rather suspect that the single call method may be more
>efficient.
Only if you use unbuffered I/O, which is highly unusual, and dead slow.
On some C libraries, if you do byte-at-a-time output, you'll output a
thousand bytes before you even get the overhead of doing a routine call -
and almost always a whole data block (1K or 8K, depending) before you do a
system call.
Certain problems have been solved by others.....
Harald A
--
Harald Tveit Alvestrand, Maxware, Norway
[EMAIL PROTECTED]
_________________________________________________________________
Unsubscribe & list info -- http://www.scruz.net/~luke/signup.htm
Mersenne Prime FAQ -- http://www.tasam.com/~lrwiman/FAQ-mers