[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Fastest Programming Language for A Slow Algorithm

Posted on 2004-09-01
8
Medium Priority
?
459 Views
Last Modified: 2010-08-05
Hi..

I'm currently working on a thesis about Morphological Analysis thru Decision Trees. Lately, we found out that the time of processing a single transaction will take less than 5 minutes.. I just need suggestions on which programming language will be suitable for our project. I've been thinking about VC++ and VB6 but our professor told us that VB6 is quite unstable. We thought of programming in DOS but we are required to develop a Windows app.

Any suggestions are greatly appreciated =)
0
Comment
Question by:justin_316_sr
8 Comments
 
LVL 45

Assisted Solution

by:sunnycoder
sunnycoder earned 1000 total points
ID: 11950643
Hi justin_316_sr,

Lesser the abstraction, higher the speed ...

Assembly will be the fastest but it is too hard to think of implementing a complex algorithm using assembly ...

I would recommend C++ or C ... In either case, you can descend into assembly to write tight code whenever required .... Code will be far more manageable and fast that way.

Wether to use C or C++ depends on you. What are you confortable with and what sort of program are you looking for? Will OOP be an advantage with that program or is it more of a procedural thing ?

Sunnycoder
0
 
LVL 35

Expert Comment

by:TimYates
ID: 11951047
java is quite quick now too, so long as you code it right ;-)
0
 
LVL 11

Accepted Solution

by:
bcladd earned 1000 total points
ID: 11952813
I would second sunnycoder's suggestion of using C/C++ (though I tend to favor C++ on principle because you get the STL and and can use those data structures quickly and easily unless they prove slow). What are you implementing your program in now? That is, what program is taking 5 minutes per transaction?

Another question is are you comfortable with your algorithm being as optimized as possible? That is, does it avoid unnecessary work (sorting a sequence more than once when it hasn't changed or using an O(n^2) sort, for example)? Just checking because the best speedups always come at the algorithm level.

-bcl
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:justin_316_sr
ID: 11953535
actually.. we're in the process of researching algorithms related to our topic.. we are not in the implementation stage yet..

basically our program will take a word and chop the rootword from the affixes.. but before doing that it must learn from a list of words given its output. i believe that we cannot alter the algorithm since the main purpose of our study is basically the implementation of this new approach in morphology. We must stick to the algo and try to make it fit to the transaction.

But ill consult our thesis adviser about speeding up the algorithm..

Thanks A lot... =)
0
 
LVL 1

Expert Comment

by:sridharj_ap
ID: 12042770
hi,

Is the algorithm too lengthy? What I mean is that if the algorithm were implemented, how many lines of code would it be?

The point I am trying to say is: Implement in all three - Assembly, VC++ and Java (use code optimizer tools along with plain compilation). Run the program atleast 20 times and compute average for each language. Decide which is the fastest. You may also want to balance performance and maintainability. The three languages are mentioned on an increasing scale of maintainability.

Regards
Sridhar

P.S: I would personally suggest VC++ - it can build a rich GUI while harnessing the power of C/C++.
0
 
LVL 1

Expert Comment

by:lamdor
ID: 12176713
Hi,

 I feel Java will be better for these kinds of application. You have many libraries to implement these kinds of Image Manipulation / Traslation.

 If you really want to go for more programming and want to very hign speed then C++ is the another option.

 P.S : I personally go though Java if this is the case.

With Regards,
Lamdor.
0
 

Author Comment

by:justin_316_sr
ID: 12210454
i need the speed of VC++ but i think i will stick with Java since i saw an open source library for machine learning which our thesis group will need. (WEKA, MLJ) By the way
0
 
LVL 35

Expert Comment

by:TimYates
ID: 12211776
...
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
This video teaches viewers about errors in exception handling.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses
Course of the Month19 days, 2 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question