develooper Front page | perl.perl5.porters | Postings from January 2014

Re: [perl #121119] [PATCH] speed up miniperl @INC searching,buildcustomize

Thread Previous | Thread Next
Dave Mitchell
January 30, 2014 13:30
Re: [perl #121119] [PATCH] speed up miniperl @INC searching,buildcustomize
Message ID:
On Thu, Jan 30, 2014 at 12:13:16AM -0800, bulk88 via RT wrote:
> > See attached patch. Each dir being searched that fails on Win32
> > results
> > in 10 I/O sys calls which I counted at 17 ms wall time, times 16 build
> > customize dirs that didn't match is an extra 272 ms of wall time
> > dealing
> > with the not found dirs during an @INC search.

That does sound extraordinarily slow. On my (admittedly fast) Linux laptop,
the following code takes approx 0.9 microsec per -f test:

    my @path = (

    my $i = 0;
    for my $file ("aaa" .."zzz") {
        for (@path) {
            next unless -f "$_/NoSuchFile-$file.pmc" or -f  "$_/NoSuchFile-$";
    print "i=$i\n";

Perhaps this implies that's there's something sub-optimal in the way perl
does its @INC scanning under Win32?

Fire extinguisher (n) a device for holding open fire doors.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About