I'd say it's not too unusual for a Perl program to be 15 times slower than an optimized C program with similar functionality. I don't think there's anything glaringly obvious that would make your code slow, though you could probably find the one or the other possibility for minor optimisations... For this, it's easiest to first profile the code to see where it spends most of its time — e.g. using Devel::NYTProf.
In reply to Re: How to make this perl version of "du" faster?
by almut
in thread How to make this perl version of "du" faster?
by dgaramond2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |