Re: [ACPI] ACPI mentioned on lwn.net/kernel

From: Andrew Pimlott (andrew@pimlott.ne.mediaone.net)
Date: Fri Jan 25 2002 - 23:38:51 EST


On Fri, Jan 25, 2002 at 11:33:44PM -0500, Alexander Viro wrote:
>
> On Sat, 26 Jan 2002, Jamie Lokier wrote:
>
> > I once wrote a Perl script that needed to know the current directory.
> > It did:
> >
> > use POSIX 'getcwd'
> > getcwd(...)
> >
> > After a few months, I was annoyed by the slowness of this script
> > (compared with other scripts) and decided to try speeding it up. It
> > turns out that the above two lines took about 0.25 of a second, and that
> > was the dominant running time of the script.
> >
> > I replaced getcwd() with `/bin/pwd`. Lo! It took about 0.0075 second.
> >
> > Says very good things about Linux' fork, exec and mmap times, and about
> > Glibc's dynamic loading time, I think.
>
> Most likely it says very bad things about getcwd() implementation in Perl
> compared to sys_getcwd() in the kernel.

No no no--it says very bad things about 'use POSIX', and in general
about overhead-creep in the perl library.

Andrew
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jan 31 2002 - 21:00:39 EST