[9418] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3019 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 30 13:57:35 1998

Date: Tue, 30 Jun 98 10:53:06 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 30 Jun 1998     Volume: 8 Number: 3019

Today's topics:
    Re: QUE: DBD-Oracle-0.50 database module (Preston L. Bannister)
    Re: QUE: DBD-Oracle-0.50 database module (John D Groenveld)
    Re: QUE: DBD-Oracle-0.50 database module <ljz@asfast.com>
        Question about CONSTANTS (Phil Taylor)
    Re: Question about CONSTANTS <uwe.honekamp@etas.de>
    Re: Question about CONSTANTS <rootbeer@teleport.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Mon, 29 Jun 1998 14:35:00 GMT
From: preston@home.com (Preston L. Bannister)
Subject: Re: QUE: DBD-Oracle-0.50 database module
Message-Id: <oCNl1.37264$dn.19736422@news.rdc2.occa.home.com>

In article <lt90mjr7hx.fsf@asfast.com>, Lloyd Zusman <ljz@asfast.com> wrote:

>I have found the transmission time between the client and the database
>server is comparable whether the client uses Perl or Java, but in
>general, I have found that Java clients themselves tend to be less
>efficient than their Perl counterparts if these clients make use of
>lots of vector, hash, string, etc. operations.
>
>I have been working on a real-time bond trading system written in Java
>(version 1.1.x), and we have had to move a lot of the calculations
>that sit near the data base interface out of the Java client and into
>the database server as stored procedures.  This gave us a speed
>increase of 5-7 times right off the bat, even before further
>optimization.
>
>Also, about 3-6 months ago, I wrote a Java/Swing application that
>performed the same functions on my machine (200 MHz Pentium Pro
>running RedHat Linux 5.0) as an already written Tk-Perl application.
>The Tk-Perl program ran 50%-100% faster.
>
>Perl is not the most efficient language to use for many applications
>(strictly in terms of execution speed), but Java tends to be even
>worse.

Just a wild guess, but likely on Linux you were not using a JIT?

Java applications run a *lot* faster with a JIT (just-in-time 
translation from Java byte codes to native executable... in case you 
just tuned in).

--
Preston L. Bannister
preston@home.com
http://members.home.net/preston


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

Date: 29 Jun 1998 14:15:07 -0400
From: groenvel@cse.psu.edu (John D Groenveld)
Subject: Re: QUE: DBD-Oracle-0.50 database module
Message-Id: <6n8ljb$jqv$1@tholian.cse.psu.edu>

Its possible for a 7.x client to access an 8 server. However, if you
move ORACLE_HOME on the client, I think you'll need to relink
DBD::Oracle.
John
groenveld@acm.org


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

Date: 29 Jun 1998 18:38:42 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: QUE: DBD-Oracle-0.50 database module
Message-Id: <ltvhpjzvd9.fsf@asfast.com>

preston@home.com (Preston L. Bannister) writes:

> In article <lt90mjr7hx.fsf@asfast.com>, Lloyd Zusman <ljz@asfast.com> wrote:
> 
> > [ ... ]
> >
> >Also, about 3-6 months ago, I wrote a Java/Swing application that
> >performed the same functions on my machine (200 MHz Pentium Pro
> >running RedHat Linux 5.0) as an already written Tk-Perl application.
> >The Tk-Perl program ran 50%-100% faster.
> >
> >Perl is not the most efficient language to use for many applications
> >(strictly in terms of execution speed), but Java tends to be even
> >worse.
> 
> Just a wild guess, but likely on Linux you were not using a JIT?

Yes ... you're right.  This was Java-sans-JIT.  I haven't done a
proper comparison between Java-with-JIT and Perl.  The Java-with-JIT
application that I have been developing at work, however, is still
painfully slow with strings, vectors, hashes, etc.  I don't have any
hard data, but I have a gut-level "feel" from my extensive experience
using both Perl and Java that Perl is still faster for similar tasks.

But until I can actually perform some benchmarks, this is pure
speculation.

> [ ... ]

-- 
 Lloyd Zusman   ljz@asfast.com
 perl -e '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
 $t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
 $x=0;map{$x+=(($_>0)?(1<<log($_-0.5)/log(2.0)+1):1)}@r;print"$x\n"'


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

Date: Mon, 29 Jun 1998 08:52:42 GMT
From: phil@ackltd.demon.co.uk (Phil Taylor)
Subject: Question about CONSTANTS
Message-Id: <359752b4.2206648@news.demon.co.uk>

How do you define a constant in Perl. I would like to 
specify several in a file which I can then include in my program
with the 'USE' statement.

I am aware that the module ' FNCTL qw( flock)' module does this to
define the locking modes but I can't find this module in the CPAN
listing.


Thanks

Phil


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

Date: 29 Jun 1998 09:06:07 GMT
From: "Uwe Honekamp" <uwe.honekamp@etas.de>
Subject: Re: Question about CONSTANTS
Message-Id: <01bda33d$24a35b60$931a0180@fe13803>

Phil Taylor <phil@ackltd.demon.co.uk> wrote =
<359752b4.2206648@news.demon.co.uk>...
> How do you define a constant in Perl. I would like to=20
> specify several in a file which I can then include in my program
> with the 'USE' statement.

perldelta:

use constant NAME =3D> VALUE=20

Provides a convenient interface for creating compile-time constants, See =
Constant Functions.=20

HTH

Uwe

--

Uwe Honekamp * ETAS GmbH * Borsigstr. 10 * D-70469 Stuttgart =20
uwe.honekamp@etas.de * voice: ++49/(0)711/89661-143 * fax: -107



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

Date: Mon, 29 Jun 1998 09:41:22 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Question about CONSTANTS
Message-Id: <Pine.GSO.3.96.980629024025.21917V-100000@user2.teleport.com>

On Mon, 29 Jun 1998, Phil Taylor wrote:

> How do you define a constant in Perl. 

Try the command 'perldoc constant'.

> I would like to specify several in a file which I can then include in my
> program with the 'USE' statement. 

I think you mean the 'use' directive. The perlmod manpage has information
on making modules. Hope this helps!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 3019
**************************************

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