Perl's poor disk IO performanceby TROGDOR (Scribe)
|on Apr 29, 2010 at 19:13 UTC||Need Help??|
TROGDOR has asked for the
wisdom of the Perl Monks concerning the following question:
Greetings fellow monks,
I am a strong advocate of perl, so I was very disappointed today when I ran some disk benchmarks and found that perl disk IO seems to be very slow.
I'm writing a gds parser. gds is a binary file format that defines a microchip layout. I wrote a very simple perl script for benchmark testing that just opens the file and reads it in using read commands, without actually doing anything with the data. The code is included below.
This script processes 10 megs of data per second. An equivalent C program that does the exact same thing processes 50 megs of data per second. Why is perl's IO so slow, and is there anything I can do to improve it? Is there an IO module with a more efficient implementation?