473,371 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,371 software developers and data experts.

Perl vs Java for specific task

Hello,

I have a rather odd question. My company is an all java/oracle shop.
We do everything is Java... no matter what it is... parsing of text
files, messaging, gui you name it. My question is this... is Perl so
much better at parsing text files and outputing that we would see a
substantial speed increase? We process about 10 million records in
flat files a day for reformatting before putting them in a DB.

Also, when it comes to Unix threading... which one would be better off
Java or perl? Essentially, we would break the 10 million down into 10
files... each file is done in a seperate thread... The program also
has to keep a hashmap of keys to make sure we don;t include duplicate
records and it must connect to oracle every once in a while... is
switching to perl worth it considering the investment and know how we
have in java? This is the only portion of the code we would consider
switching to perl...

ideas?

Thanks,

Joie
Jul 19 '05 #1
3 8137
li*************@yahoo.com (John Smith) wrote in message news:<24**************************@posting.google. com>...
I have a rather odd question. My company is an all java/oracle shop.
We do everything is Java... no matter what it is... parsing of text
files, messaging, gui you name it. My question is this... is Perl so
much better at parsing text files and outputing that we would see a
substantial speed increase? We process about 10 million records in
flat files a day for reformatting before putting them in a DB.

Also, when it comes to Unix threading... which one would be better off
Java or perl?
AFIAK most Java implementations have a much better threading
implementation than is found in Perl5. This is becase Java was
designed to be threaded from day-0. In Perl threading is very much an
afterthought.

Up until Perl5.8 Perl's threading was essentially useless and even now
you are usually better using forks than threads on Perl.
Essentially, we would break the 10 million down into 10
files... each file is done in a seperate thread... The program also
has to keep a hashmap of keys to make sure we don;t include duplicate
records and it must connect to oracle every once in a while... is
switching to perl worth it considering the investment and know how we
have in java? This is the only portion of the code we would consider
switching to perl...


A Perl programmer could possibly write a solution using 10 separate
processes that would outperform a Java solution. But no even as a fan
of Perl I wouldn't say this alone was sufficient justification to
learn Perl.

This newsgroup does not exist (see FAQ). Please do not start threads
here.
Jul 19 '05 #2
John Smith wrote:
Hello,

I have a rather odd question. My company is an all java/oracle shop.
We do everything is Java... no matter what it is... parsing of text
files, messaging, gui you name it. My question is this... is Perl so
much better at parsing text files and outputing that we would see a
substantial speed increase? We process about 10 million records in
flat files a day for reformatting before putting them in a DB.
Yes, I'd think perl is that much better, it's designed for parsing text
data. It also uses a runtime model that tends to use higher level
operations, spending less time interpreting the model and more doing
work. As opposed to JRE which uses a low level byte code. Not to
mention that someone who knew the language could generate the parsing
code in perl faster and easier than in java.
Also, when it comes to Unix threading... which one would be better off
Java or perl? Essentially, we would break the 10 million down into 10
files... each file is done in a seperate thread... The program also
has to keep a hashmap of keys to make sure we don;t include duplicate
records and it must connect to oracle every once in a while... is
switching to perl worth it considering the investment and know how we
have in java? This is the only portion of the code we would consider
switching to perl...

ideas?

Thanks,

Joie


Is the multithreaded design inherant to the problem or part of a java
style solution, as in watching multiple input files? While perl is weak
at multithreading, it is very good at not needing to multithread. An
optimal solution in perl would probably be structured differently than
an optimal solution in java.

Jul 19 '05 #3
no****@mail.com wrote in message news:<4d**************************@posting.google. com>...
li*************@yahoo.com (John Smith) wrote in message news:<24**************************@posting.google. com>...
I have a rather odd question. My company is an all java/oracle shop.
We do everything is Java... no matter what it is... parsing of text
files, messaging, gui you name it. My question is this... is Perl so
much better at parsing text files and outputing that we would see a
substantial speed increase? We process about 10 million records in
flat files a day for reformatting before putting them in a DB.

Also, when it comes to Unix threading... which one would be better off
Java or perl?
AFIAK most Java implementations have a much better threading
implementation than is found in Perl5. This is becase Java was
designed to be threaded from day-0. In Perl threading is very much an
afterthought.


Okay, I have heard this before... but what I need to do is this. I
need to parse 4 or 5 delimited text files that have between one and
two million records in them each. Now. I was thinking it would be
best to use perl because then I don't have the overhead of the JVM and
from my past memory perl was ALWAYS the choice for text parsing.
However, as you suggested... perl was not written originally to be
multithreaded.... so will launching > 1 perl program off in seperate
threads be a problem or is it simply that a single multi-threaded perl
application has issues?
Up until Perl5.8 Perl's threading was essentially useless and even now
you are usually better using forks than threads on Perl.
Essentially, we would break the 10 million down into 10
files... each file is done in a seperate thread... The program also
has to keep a hashmap of keys to make sure we don;t include duplicate
records and it must connect to oracle every once in a while... is
switching to perl worth it considering the investment and know how we
have in java? This is the only portion of the code we would consider
switching to perl...
A Perl programmer could possibly write a solution using 10 separate
processes that would outperform a Java solution. But no even as a fan
of Perl I wouldn't say this alone was sufficient justification to
learn Perl.


Well, I will take your statement into account... it seems as though it
might be worth looking into doing it in java as well. Any more tips
or info?

This newsgroup does not exist (see FAQ). Please do not start threads
here.

Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

58
by: @ | last post by:
A benchmark in 2002 showed PHP is much slower in shell or when Apache has Mod_Perl. With the new PHP kissing Java's ass, Perl is once again the #1 CGI choice. Java is for a big team in short...
6
by: John Smith | last post by:
Hello, I have a rather odd question. My company is an all java/oracle shop. We do everything is Java... no matter what it is... parsing of text files, messaging, gui you name it. My question...
1
by: bezeee | last post by:
At my work we are in the process of building a tool to test an XML based API. Basically, XML in and XML out over http. Currently, there are two engines that do all of the schema validations, xml...
3
by: Mohammd M. Hussain | last post by:
Hi, I have a good knowledge of Perl ( 2 and half years ) and despite working with the language that long, I have yet to build a substantial program ( during this time I was merely testing out...
385
by: Xah Lee | last post by:
Jargons of Info Tech industry (A Love of Jargons) Xah Lee, 2002 Feb People in the computing field like to spur the use of spurious jargons. The less educated they are, the more they like...
6
by: Danny Lu | last post by:
Hi, can anyone tell me where I can get a good perl book? TIA Dan
0
by: Kirt Loki Dankmyer | last post by:
So, I download the latest "stable" tar for perl (5.8.7) and try to compile it on the Solaris 8 (SPARC) box that I administrate. I try all sorts of different switches, but I can't get it to compile....
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
1
by: jaimemartin | last post by:
hello, I want to validate an xml by means of a schema (xsd). To do that first of all Im using a SchemaFactory. The problem is that if I run the code in Windows all works fine, but If I run it in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.