Re: reading files c vs perl

2009-04-16 Thread Emen Zhao
This is no surprise, regexp is a relatively heavy function, a lot of dirty work behind the scene. On Thu, Apr 16, 2009 at 2:13 PM, John W. Krahn wrote: > Emen Zhao wrote: > >> This is off topic. But I'm just curious about why "4096" is picked here. >> Is >> there any particular reason behind it?

Re: reading files c vs perl

2009-04-16 Thread Emen Zhao
Thank you, Chas! This is great to know. I guess I got used to taking a plethora of memory as granted. :-) --Emen

Re: reading files c vs perl

2009-04-15 Thread John W. Krahn
Emen Zhao wrote: This is off topic. But I'm just curious about why "4096" is picked here. Is there any particular reason behind it? I guess you can even calc the lines like this - perl -0777 -wne 'print scalar ($_=~s/\n//g)' filename Except that it's slower than using tr///: $ time perl -ln077

Re: reading files c vs perl

2009-04-15 Thread Chas. Owens
On Thu, Apr 16, 2009 at 00:58, Emen Zhao wrote: > This is off topic. But I'm just curious about why "4096" is picked here. Is > there any particular reason behind it? I guess you can even calc the lines > like this - > perl -0777 -wne 'print scalar ($_=~s/\n//g)' filename > > Thanks, > Emen > 409

Re: reading files c vs perl

2009-04-15 Thread Emen Zhao
This is off topic. But I'm just curious about why "4096" is picked here. Is there any particular reason behind it? I guess you can even calc the lines like this - perl -0777 -wne 'print scalar ($_=~s/\n//g)' filename Thanks, Emen

Re: reading files c vs perl

2009-04-15 Thread Jerry Rocteur
On 15 Apr 2009, at 13:01, John W. Krahn wrote: Dermot wrote: 2009/4/14 Chas. Owens : On Tue, Apr 14, 2009 at 11:49, Rick wrote: is it true that perl will be just as fast as c for reading files ? for example cow...@amans:~$ time cat /usr/share/dict/words | perl wc.pl my $count = 0; $/ =

Re: reading files c vs perl

2009-04-15 Thread John W. Krahn
Dermot wrote: 2009/4/14 Chas. Owens : On Tue, Apr 14, 2009 at 11:49, Rick wrote: is it true that perl will be just as fast as c for reading files ? for example cow...@amans:~$ time cat /usr/share/dict/words | perl wc.pl my $count = 0; $/ = \4096; while (<>) { $count += tr/\n//;

Re: reading files c vs perl

2009-04-15 Thread Dermot
2009/4/14 Chas. Owens : > On Tue, Apr 14, 2009 at 11:49, Rick wrote: >> is it true that perl will be just as fast as c for reading files ? >> >> for example >> > cow...@amans:~$ time cat /usr/share/dict/words | perl wc.pl > my $count = 0; > > $/ = \4096; > while (<>) { >        $count += tr/\n//

Re: reading files c vs perl

2009-04-14 Thread Chas. Owens
On Tue, Apr 14, 2009 at 11:49, Rick wrote: > is it true that perl will be just as fast as c for reading files ? > > for example > > will  below be as fast as if it were written in c? > I said this because on random posts, I see that perl is optimized to work w/ > text files and it should be as fas

reading files c vs perl

2009-04-14 Thread Rick
is it true that perl will be just as fast as c for reading files ? for example will below be as fast as if it were written in c? I said this because on random posts, I see that perl is optimized to work w/ text files and it should be as fast as perl open FILE, $file or die "bad filename: $!"

RE: C vs. Perl

2002-01-02 Thread Maciejewski, Thomas
Haslock; [EMAIL PROTECTED] Subject: Re: C vs. Perl Thank-you to everyone for the responses. Roger, 1) I am personally obsessed with effeciency. This is why I am considering moving to C or C++. 2) I am not exactly sure what you mean by "profiled your Perl", however I do do benchmarks o

Re: C vs. Perl

2002-01-02 Thread Roger C Haslock
ob Showalter'" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, January 02, 2002 7:04 PM Subject: RE: C vs. Perl > not to get flamed here but one of the reasons I dont like perl is that there > are sometimes too many ways to do something ... and all of them

RE: C vs. Perl

2002-01-02 Thread Chris Spurgeon
> 2) I am not exactly sure what you mean by "profiled your Perl", however I do > do benchmarks on code. I am in the process of redesigning our website, and > thus taking this opportunity to improve upon old scripts that will need > changing anyways. Current improvements to our main script have

[ADMIN - THREAD CLOSED] C vs. Perl

2002-01-02 Thread Kevin Meltzer
Hello folks, I am closing this thread. Although it is a very interesting conversation to have with people, this really isn't the place for it. Feel free to continue it off-list with interested parties, but consider this thread closed and do not respond to the list itself. Thanks for your cooperat

Re: C vs. Perl

2002-01-02 Thread Agustin Rivera
nt: Wednesday, January 02, 2002 11:44 AM Subject: Re: C vs. Perl > There are many views on this. > > 1) Well designed and implemented C will be faster if the application is > CPU-intensive. Is this the case? > 2) Have you profiled your Perl? Have you experimented with the Inline

FW: C vs. Perl

2002-01-02 Thread Busse, Rich
ing. 3. If you really want Perl binaries, see if http://www.indigostar.com/perl2exe.htm is of any help. -Original Message- From: Agustin Rivera [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 02 January, 2002 12:10 To: [EMAIL PROTECTED] Subject: C vs. Perl Ok, the local Linux guru has pr

RE: C vs. Perl

2002-01-02 Thread Bob Showalter
> -Original Message- > From: Hanson, Robert [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 02, 2002 2:21 PM > To: 'Maciejewski, Thomas' > Cc: [EMAIL PROTECTED] > Subject: RE: C vs. Perl > > > No flames from me. > > One of Perl's st

RE: Re[2]: C vs. Perl

2002-01-02 Thread Maciejewski, Thomas
From: Daniel Gardner [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 2:44 PM To: Maciejewski, Thomas Cc: 'Hanson, Robert'; Agustin Rivera; [EMAIL PROTECTED] Subject: Re[2]: C vs. Perl Wednesday, January 02, 2002, 7:06:34 PM, Maciejewski, Thomas wrote: > how ? > thr

Re[2]: C vs. Perl

2002-01-02 Thread Daniel Gardner
n.org/search?dist=Apache-Session http://search.cpan.org/search?dist=MLDBM-Sync hth, daniel > -Original Message- > From: Hanson, Robert [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 02, 2002 2:09 PM > To: Maciejewski, Thomas; Agustin Rivera; [EMAIL PROTECTED] > Subj

Re: C vs. Perl

2002-01-02 Thread Roger C Haslock
development to use C? - Roger - - Original Message - From: "Agustin Rivera" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 02, 2002 5:10 PM Subject: C vs. Perl > Ok, the local Linux guru has proclaimed that C would be faster than Perl. I >

RE: C vs. Perl

2002-01-02 Thread Brett W. McCoy
On Wed, 2 Jan 2002, Dean Theophilou wrote: > Your quote is incorrect, from what I remember, that is. It's more like "a more > wretched hive of scum and villainy" (sp?). *shrug* My quotes come up completely randomly -- I have no control over how accurate or not accurate they are. :-) -- Brett

RE: C vs. Perl

2002-01-02 Thread Brett W. McCoy
On Wed, 2 Jan 2002, Hanson, Robert wrote: > I don't deal with IPC, so I can't give you an example off the top of my > head. The perlfork manpage has a bunch of info though depending on what you > want to do, and there are probably a bunch of modules out there as well to > simplify the process.

RE: C vs. Perl

2002-01-02 Thread Brett W. McCoy
On Wed, 2 Jan 2002, Maciejewski, Thomas wrote: > heh ... again though in large groups ... this becomes a bit of a problem > since you all have to kind of be in sync with coding styles and courteous > coding This is more a part of the software development process than it is the responsibility of

RE: C vs. Perl

2002-01-02 Thread Dean Theophilou
'Bob Showalter'; [EMAIL PROTECTED] Subject: RE: C vs. Perl On Wed, 2 Jan 2002, Maciejewski, Thomas wrote: > not to get flamed here but one of the reasons I dont like perl is that > there are sometimes too many ways to do something ... and all of them > are fairly cryptic ... peo

RE: C vs. Perl

2002-01-02 Thread KeN ClarK
would it be rude to ask ya'll to take this thread elsewhere. this list is so high-traffic already. if as a fledgling newbie i've overstepped any bounds, my apologies. tia, ken On Wed, 2 Jan 2002, Brett W. McCoy wrote: > On Wed, 2 Jan 2002, Maciejewski, Thomas wrote: > > > not to get flam

RE: C vs. Perl

2002-01-02 Thread Hanson, Robert
ago when I played around with IPC, but I forget the name. Rob -Original Message- From: Maciejewski, Thomas [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 2:07 PM To: Hanson, Robert; Agustin Rivera; [EMAIL PROTECTED] Subject: RE: C vs. Perl how ? through CGI? can y

RE: C vs. Perl

2002-01-02 Thread Maciejewski, Thomas
I am actually programming perl for work and am trying to learn it ... -Original Message- From: Brett W. McCoy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 2:22 PM To: Maciejewski, Thomas Cc: 'Bob Showalter'; [EMAIL PROTECTED] Subject: RE: C vs. Perl On

RE: C vs. Perl

2002-01-02 Thread Maciejewski, Thomas
, Robert [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 2:21 PM To: Maciejewski, Thomas Cc: [EMAIL PROTECTED] Subject: RE: C vs. Perl No flames from me. One of Perl's strong/weak points is that there are too many ways to do something... I agree with that. But it is up to the progr

RE: C vs. Perl

2002-01-02 Thread Brett W. McCoy
On Wed, 2 Jan 2002, Maciejewski, Thomas wrote: > not to get flamed here but one of the reasons I dont like perl is that > there are sometimes too many ways to do something ... and all of them > are fairly cryptic ... people having different coding styles can really > confuse the hell out of some

RE: C vs. Perl

2002-01-02 Thread Hanson, Robert
opt for the first... saves me lots of time and typing. Just be curtious when you code. Rob -Original Message- From: Maciejewski, Thomas [mailto:[EMAIL PROTECTED]] Subject: RE: C vs. Perl not to get flamed here but one of the reasons I dont like perl is that there are sometimes too many

RE: C vs. Perl

2002-01-02 Thread Maciejewski, Thomas
: Agustin Rivera; [EMAIL PROTECTED] Subject: RE: C vs. Perl On Wed, 2 Jan 2002, Maciejewski, Thomas wrote: > agreed that OO isnt always better but the point that I was trying to make > was that I would rather build more structured code that is easier to > maintain / debug than to worry

RE: C vs. Perl

2002-01-02 Thread Maciejewski, Thomas
how ? through CGI? can you post an example? -Original Message- From: Hanson, Robert [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 2:09 PM To: Maciejewski, Thomas; Agustin Rivera; [EMAIL PROTECTED] Subject: RE: C vs. Perl "One benifit to running java though .

RE: C vs. Perl

2002-01-02 Thread Brett W. McCoy
On Wed, 2 Jan 2002, Maciejewski, Thomas wrote: > agreed that OO isnt always better but the point that I was trying to make > was that I would rather build more structured code that is easier to > maintain / debug than to worry about the internal speed of a program ... > also wanted to point out t

RE: C vs. Perl

2002-01-02 Thread Hanson, Robert
ustin Rivera; [EMAIL PROTECTED] Subject: RE: C vs. Perl agreed that OO isnt always better but the point that I was trying to make was that I would rather build more structured code that is easier to maintain / debug than to worry about the internal speed of a program ... also wanted to point out

RE: C vs. Perl

2002-01-02 Thread Maciejewski, Thomas
, January 02, 2002 1:58 PM To: Maciejewski, Thomas Cc: [EMAIL PROTECTED] Subject: RE: C vs. Perl > -Original Message- > From: Maciejewski, Thomas [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 02, 2002 1:44 PM > To: 'Brett W. McCoy'; Agustin Rivera > Cc: [E

RE: C vs. Perl

2002-01-02 Thread Hanson, Robert
t W. McCoy'; Agustin Rivera Cc: [EMAIL PROTECTED] Subject: RE: C vs. Perl how about all of the issues involved with spawning off processes ... in java servlets I know this is handled because the servlet is always running ... you may end up with a more efficient system and easier to debug

RE: C vs. Perl

2002-01-02 Thread Maciejewski, Thomas
:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 2:01 PM To: Maciejewski, Thomas Cc: Agustin Rivera; [EMAIL PROTECTED] Subject: RE: C vs. Perl On Wed, 2 Jan 2002, Maciejewski, Thomas wrote: > how about all of the issues involved with spawning off processes ... > > in java servlets I kno

RE: C vs. Perl

2002-01-02 Thread Bob Showalter
> -Original Message- > From: Maciejewski, Thomas [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 02, 2002 1:44 PM > To: 'Brett W. McCoy'; Agustin Rivera > Cc: [EMAIL PROTECTED] > Subject: RE: C vs. Perl > > > how about all of the issues

RE: C vs. Perl

2002-01-02 Thread Brett W. McCoy
y end up with a more efficient system and easier to debug code and all > of the other benifits from OO ... pretty much all around better by > re-writing in java ... rather than c Bah, OO isn't always the best way. I won't get into a Java vs. C vs. Perl thing here, but you code in a s

RE: C vs. Perl

2002-01-02 Thread Maciejewski, Thomas
PROTECTED] Subject: Re: C vs. Perl I personally think if you have working, secure scripts in Perl, and are accustomed to maintaining them, then it is not worthwhile to port to C. While it is faster, I think the time spent fussing with the porting, etc is not worth it. If you really, really need more

RE: C vs. Perl

2002-01-02 Thread Maciejewski, Thomas
by re-writing in java ... rather than c -Original Message- From: Brett W. McCoy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 1:21 PM To: Agustin Rivera Cc: [EMAIL PROTECTED] Subject: Re: C vs. Perl On Wed, 2 Jan 2002, Agustin Rivera wrote: > Ok, the local Linux guru

Re: C vs. Perl

2002-01-02 Thread Brett W. McCoy
On Wed, 2 Jan 2002, Agustin Rivera wrote: > Ok, the local Linux guru has proclaimed that C would be faster than Perl. I > know C is very effecient so I don't really doubt him, but my question is > would it make that much of a difference? I certainly wouldn't mind learning > C, the only ques

Re: C vs. Perl

2002-01-02 Thread GoodleafJ
ot;Agustin Rivera" To: <[EMAIL PROTECTED]> Su

Re: C vs. Perl

2002-01-02 Thread Curtis Poe
--- Agustin Rivera <[EMAIL PROTECTED]> wrote: > Ok, the local Linux guru has proclaimed that C would be faster than Perl. I > know C is very effecient so I don't really doubt him, but my question is > would it make that much of a difference? I certainly wouldn't mind learning > C, the only q

RE: C vs. Perl

2002-01-02 Thread Hanson, Robert
code with the speed benefit... most likely it would be far cheaper just to add another processor to your web box. Rob -Original Message- From: Agustin Rivera [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 12:10 PM To: [EMAIL PROTECTED] Subject: C vs. Perl Ok, the local

RE: C vs. Perl

2002-01-02 Thread Maciejewski, Thomas
-Original Message- From: Agustin Rivera [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 12:10 PM To: [EMAIL PROTECTED] Subject: C vs. Perl Ok, the local Linux guru has proclaimed that C would be faster than Perl. I know C is very effecient so I don't really doubt him, b

C vs. Perl

2002-01-02 Thread Agustin Rivera
Ok, the local Linux guru has proclaimed that C would be faster than Perl. I know C is very effecient so I don't really doubt him, but my question is would it make that much of a difference? I certainly wouldn't mind learning C, the only question is would be worth the time to port our Perl sc