[26649] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 8756 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Dec 12 14:05:15 2005

Date: Mon, 12 Dec 2005 11:05:05 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 12 Dec 2005     Volume: 10 Number: 8756

Today's topics:
    Re: threads <nospam-abuse@ilyaz.org>
    Re: What is the reason for Perl? <jgibson@mail.arc.nasa.gov>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 12 Dec 2005 17:29:06 +0000 (UTC)
From:  Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: threads
Message-Id: <dnkc12$8bp$1@agate.berkeley.edu>

[A complimentary Cc of this posting was sent to
Tassilo v. Parseval
<tassilo.von.parseval@rwth-aachen.de>], who wrote in article <402432F16rjv2U1@news.dfncis.de>:
> > Sorry, Tassilo, but IMO this is pure BS (and I wrote the reasons why
> > many times).  The reason is that for thread creation Perl uses a
> > mechanism (cloning) which was designed as a way to circumvent a
> > completely unrelated problem (absense of fork() in Win* environment)
> > [and circumvent it only partially].

> I strongly doubt that this was the only reason. Perl's ithreads have
> another advantange: Due to the fact that nothing is shared by default,

[Some may consider this as a major disadvantage.]  Anyway, if the
interpreter in the newly created thread would be created "from
scratch", nothing would be shared too, so I could not immediately see
why this may be an argument in favor of cloning.

> Besides: In my posting I didn't say anything about the why of Perl's
> threading model. So even if the fork-emulation on Win32 was the actual
> reason, why would not mentioning it render my statement BS? 

Your statement was:

> >> The actual reason is the fact that Perl threads are interpreter threads,
> >> meaning that a whole Perl interpreter has to be cloned.

Please pay attention to "meaning that".

> > Did you run any benchmark?  In my measurements, cloning takes about
> > 1.5 ORDERS OF MAGNITUDE more time than one needed to create the
> > initial environment.
> 
> And that surprises you? By the time the cloning happens, a lot more data
> is there than at process start-up time: tmp-stacks and pads are usually
> already well filled to name but one example. This is all spelled out in
> ext/threads/threads.xs:Perl_ithread_create().

"Creation of the initial environment" includes the time to fill these
"tmp-stacks etc".  Also, one could get an impression that having these
"stuff" filled is some kind of advantage.  AFAIU, it is not.

> You seem to be implying that all I wrote was nonsense and wrong.

Sorry if you got this impression.  I thought I separated the
questionable parts from the rest.

> And yet, nothing you wrote contradicts what I said.

Please allow me to disagree.

Yours,
Ilya


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

Date: Mon, 12 Dec 2005 10:23:16 -0800
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: What is the reason for Perl?
Message-Id: <121220051023167729%jgibson@mail.arc.nasa.gov>

In article <ohkpp15b78vlhrpb8bcag801jd78ed0pb1@4ax.com>, robic0 wrote:

> Explain to me if you can why Perl is something I should use in
> replacement to say C++ and a native API....

I have programmed Fortran, C, Ada, C++, and Java professionally for 30
years. I use Perl because I can get things done in a shorter amount of
time than any other language, if Perl does the job. There are
situations in which Perl will not work -- use of an external library
that is impossible or difficult to use from Perl, for example.

I believe that the characteristics of Perl that allow this are:

1. Support for regular expressions
2. Support for associative arrays (hashes)
3. Support for executing external programs with output capture
(backticks)
4. Support for native Unix utilities (mkdir, chmod, etc.)
5. Availability of modules like Getopt::Long and Find::File.

I program in the Unix environment, and don't do Windows, so the
advantages and disadvantages of Perl under Windows may be different.

> Let the bullshit begin .........->

Interesting that you ask people for their opinion and then assume that
the responses will be BS. Why bother?

 Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------        
                http://www.usenet.com


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 8756
***************************************


home help back first fref pref prev next nref lref last post