0

When is sysread better than read for fetching data in perl? The perlfunc sections on sysread and read give advice that is not entirely clear on when to choose which.

In a response to another question I used Stream::Reader. As an experiment I replaced read with sysread in Reader.pm and gained 9-10% throughput. This seems too simple and - other than what I can glean from perlfunc - I am not clear on what the trade offs might be.

Community
  • 1
  • 1
G. Cito
  • 6,210
  • 3
  • 29
  • 42

0 Answers0