the 8 byte buffer would result in a lot of disk thrashing compared to 64k buffer
And there shouldn't be any disk trashing because read and write are buffered. The size of the buffer isn't 8 bytes as you claim, but rather a multiple of the size of a disc sector. The disk is not accessed every time read and write is called.
Because I thought read would be slower than sysread
sysread + syswrite + manual buffering in Perl
should be slower than
read + write + well tested buffering in C
Note that I didn't say my way is faster, just that it might be. Benchmark to find out which is faster on your system.
In reply to Re^3: Fast parsing for cypher block chaining
by ikegami
in thread Fast parsing for cypher block chaining
by fluffyvoidwarrior
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |