The rename command…
Ulf Rompe
Ulf.Rompe at icem.com
Thu Aug 28 09:40:33 UTC 2008
On Mi, 2008-08-27 at 21:46 +0200, Johnny Rosenberg wrote:
> I don't know very much about Perl, almost nothing at all, but isn't
> Perl a programming language that doesn't use a compiler? Maybe I
> misunderstood, but isn't the Perl rename thing written in Perl? If so,
> shouldn't that mean that rename is quite a lot slower than it would be
> if it was written in, for example, C, like I think the rest of the
> Unix/GNU/Linux commands are, such as mv?
You're right, Perl is an interpreted language. Therefore in general the
startup time of a program written in Perl is longer that that of a
compiled C program. OTOH, when it comes to regular expressions, Perl is
unbeatable fast, so a Perl program may well outperform a C counterpart
in runtime.
I don't think your use case is complex enough to really precipitate a
difference between both that would be more than just measurable, but for
sure you could construct commands that would perform way better in
either the C or the Perl variants.
[x] ulf
--
This message represents the official view of the voices in my head.
More information about the ubuntu-users
mailing list