Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Perl is too slow - A statement

Reply
Thread Tools

Perl is too slow - A statement

 
 
mercurish@googlemail.com
Guest
Posts: n/a
 
      04-25-2009
We hear this all too common:
"I have one huge problem with Perl; it is too slow."

But is Perl realy slow, could perl be slow at all?

The problem is that most programmers associate an implementation of a
programming
language with the language it self. The current interpreter is too
slow and hence programmers
think that 'Perl' is too slow.

Perl5 doesn't perform anything to make Perl machine like-able, Perl5
is infact hated by machines
where the Perl5 program is being executed.

Though however, with Perl6 the maintainers of the programming language
are hoping to reduce the
runtime overhead of using Perl over the traditional programming
languages such as C.

But is Perl ready to be used for huge projects or is other languges
such as Python taking over??

What are we going to do??


-- Kasra




 
Reply With Quote
 
 
 
 
Uri Guttman
Guest
Posts: n/a
 
      04-25-2009
>>>>> "m" == mercurish <(E-Mail Removed)> writes:

m> What are we going to do??

*'WE'* are going to ignore trolls like you who don't know from slow vs
fast. you can create slow programs in any language. i can write perl
that runs faster than most people can in their favorite language. you
question is useless.

uri

--
Uri Guttman ------ http://www.velocityreviews.com/forums/(E-Mail Removed) -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
 
Reply With Quote
 
 
 
 
Michael Vilain
Guest
Posts: n/a
 
      04-25-2009
In article
<(E-Mail Removed)>,
(E-Mail Removed) wrote:

> We hear this all too common:
> "I have one huge problem with Perl; it is too slow."
>
> But is Perl realy slow, could perl be slow at all?
>
> The problem is that most programmers associate an implementation of a
> programming
> language with the language it self. The current interpreter is too
> slow and hence programmers
> think that 'Perl' is too slow.
>
> Perl5 doesn't perform anything to make Perl machine like-able, Perl5
> is infact hated by machines
> where the Perl5 program is being executed.
>
> Though however, with Perl6 the maintainers of the programming language
> are hoping to reduce the
> runtime overhead of using Perl over the traditional programming
> languages such as C.
>
> But is Perl ready to be used for huge projects or is other languges
> such as Python taking over??
>
> What are we going to do??
>
>
> -- Kasra


As a recovering sysadmin, I find perl to be more than excellent at doing
the day-to-day stuff. It's my tool of choice unless I can bang
something out in the shell in 5 minutes.

As to generalized trollish comments about performance, I find it's
usually not the tool that's needs performance enhancement, it's the
performer that needs enhancement.

--
DeeDee, don't press that button! DeeDee! NO! Dee...
[I filter all Goggle Groups posts, so any reply may be automatically by ignored]


 
Reply With Quote
 
neilsolent
Guest
Posts: n/a
 
      04-26-2009
> We hear this all too common:
> * * * * * * "I have one huge problem with Perl; it is too slow."
>
> But is Perl realy slow, could perl be slow at all?


In my experience Perl is fast, in fact breath-takingly fast for an
interpreted language, and given the huge high-level functionality it
provides.
I don't have any benchmarks to back this up, but I think it is a known
fact that it compares reasonably to even optimised C code, performing
similar tasks. Obviously it really depends what tasks we are talking
about.
Why don't you post some simple scripts doing what you think Perl is
slow at - and show us how it can be done faster in some other language?
 
Reply With Quote
 
Charlton Wilbur
Guest
Posts: n/a
 
      04-26-2009
>>>>> "m" == mercurish <(E-Mail Removed)> writes:

m> But is Perl ready to be used for huge projects or is other
m> languges such as Python taking over??

You might have asked this question a decade and a half ago, and gotten
an interesting debate. As it is, Perl is not only ready to be used for
huge projects, but is actually currently being used for large projects.

m> What are we going to do??

We are going to continue working on our codebases of hundreds of
thousands of lines of Perl. What are *you* going to do?

Charlton






--
Charlton Wilbur
(E-Mail Removed)
 
Reply With Quote
 
sln@netherlands.com
Guest
Posts: n/a
 
      04-26-2009
On Sun, 26 Apr 2009 01:21:30 -0700 (PDT), neilsolent <(E-Mail Removed)> wrote:

>> We hear this all too common:
>> * * * * * * "I have one huge problem with Perl; it is too slow."
>>
>> But is Perl realy slow, could perl be slow at all?

>
>In my experience Perl is fast, in fact breath-takingly fast for an
>interpreted language, and given the huge high-level functionality it
>provides.
>I don't have any benchmarks to back this up, but I think it is a known
>fact that it compares reasonably to even optimised C code, performing
>similar tasks. Obviously it really depends what tasks we are talking
>about.
>Why don't you post some simple scripts doing what you think Perl is
>slow at - and show us how it can be done faster in some other language?


char *str = "This is a long sentence";
printf ("%s", &str[10]);

----------------

my $str = "This is a long sentence";
my @words = split ' ', $str;
printf ("%s %s", @words[3,4]);


-sln

 
Reply With Quote
 
Tad J McClellan
Guest
Posts: n/a
 
      04-26-2009
(E-Mail Removed) <(E-Mail Removed)> wrote:
> On Sun, 26 Apr 2009 01:21:30 -0700 (PDT), neilsolent <(E-Mail Removed)> wrote:
>
>>> We hear this all too common:
>>> * * * * * * "I have one huge problem with Perl; it is too slow."
>>>
>>> But is Perl realy slow, could perl be slow at all?

>>
>>In my experience Perl is fast, in fact breath-takingly fast for an
>>interpreted language, and given the huge high-level functionality it
>>provides.
>>I don't have any benchmarks to back this up, but I think it is a known
>>fact that it compares reasonably to even optimised C code, performing
>>similar tasks. Obviously it really depends what tasks we are talking
>>about.
>>Why don't you post some simple scripts doing what you think Perl is
>>slow at - and show us how it can be done faster in some other language?

>
> char *str = "This is a long sentence";
> printf ("%s", &str[10]);
>
> ----------------
>
> my $str = "This is a long sentence";



print substr($str, 10);


--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
 
Reply With Quote
 
neilsolent
Guest
Posts: n/a
 
      04-27-2009
On 26 Apr, 22:33, Tad J McClellan <(E-Mail Removed)> wrote:
> (E-Mail Removed) <(E-Mail Removed)> wrote:
> > On Sun, 26 Apr 2009 01:21:30 -0700 (PDT), neilsolent <(E-Mail Removed)> wrote:

>
> >>> We hear this all too common:
> >>> * * * * * * "I have one huge problem with Perl; it is tooslow."

>
> >>> But is Perl realy slow, could perl be slow at all?

>
> >>In my experience Perl is fast, in fact breath-takingly fast for an
> >>interpreted language, and given the huge high-level functionality it
> >>provides.
> >>I don't have any benchmarks to back this up, but I think it is a known
> >>fact that it compares reasonably to even optimised C code, performing
> >>similar tasks. Obviously it really depends what tasks we are talking
> >>about.
> >>Why don't you post some simple scripts doing what you think Perl is
> >>slow at - and show us how it can be done faster in some other language?

>
> > char *str = "This is a long sentence";
> > printf ("%s", &str[10]);

>
> > ----------------

>
> > my $str = "This is a long sentence";

>
> * * print substr($str, 10);
>
> --
> Tad McClellan
> email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"- Hide quoted text -
>
> - Show quoted text -


Running these "equivalent" bits of Perl an C in a tight loop (1000000
iterations) - shows on my machine:

approx 0.3s run time for the C
approx 0.9s run time for Perl

I think this is pretty good considering Perl is interpreted and (I
suspect) the example is deliberately picked to find something C is
faster at!


 
Reply With Quote
 
Uri Guttman
Guest
Posts: n/a
 
      04-27-2009
>>>>> "n" == neilsolent <(E-Mail Removed)> writes:

>> > char *str = "This is a long sentence";
>> > printf ("%s", &str[10]);
>> > ----------------
>> > my $str = "This is a long sentence";

>> * * print substr($str, 10);


n> Running these "equivalent" bits of Perl an C in a tight loop (1000000
n> iterations) - shows on my machine:

n> approx 0.3s run time for the C
n> approx 0.9s run time for Perl

n> I think this is pretty good considering Perl is interpreted and (I
n> suspect) the example is deliberately picked to find something C is
n> faster at!

it also shows you have no clue about what is important these
days. development time is way more expensive than running time. you can
always get a faster computer but you rarely can speed up a development
schedule.

uri

--
Uri Guttman ------ (E-Mail Removed) -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
 
Reply With Quote
 
Petr Vileta \fidokomik\
Guest
Posts: n/a
 
      04-27-2009
(E-Mail Removed) wrote:
> On Sun, 26 Apr 2009 01:21:30 -0700 (PDT), neilsolent
> <(E-Mail Removed)> wrote:
>
>> Why don't you post some simple scripts doing what you think Perl is
>> slow at - and show us how it can be done faster in some other
>> language?

>
> char *str = "This is a long sentence";
> printf ("%s", &str[10]);
>
> ----------------
>
> my $str = "This is a long sentence";
> my @words = split ' ', $str;
> printf ("%s %s", @words[3,4]);
>


Bad!

my $str = "This is a long sentence";
print substr($str, 10);

--
Petr Vileta, Czech Republic
(My server rejects all messages from Yahoo and Hotmail.
Send me your mail from another non-spammer site please.)
Please reply to <petr AT practisoft DOT cz>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: slow slow slow! Expert lino fitter Computer Support 5 12-12-2008 04:00 PM
Re: slow slow slow! Beauregard T. Shagnasty Computer Support 2 12-10-2008 09:03 PM
Re: slow slow slow! Expert lino fitter Computer Support 0 12-10-2008 02:33 PM
Effect.SlideUp is too slow--next statement executes immediately nolo contendere Javascript 7 11-09-2007 08:44 PM
Problems with imaging (too slow or too much RAM) SB Java 0 08-05-2003 11:06 AM



Advertisments