Solved

Fastest Programming Language for A Slow Algorithm

Posted on 2004-09-01
8
438 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 250 total points
Comment Utility
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
Comment Utility
java is quite quick now too, so long as you code it right ;-)
0
 
LVL 11

Accepted Solution

by:
bcladd earned 250 total points
Comment Utility
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
 

Author Comment

by:justin_316_sr
Comment Utility
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 1

Expert Comment

by:sridharj_ap
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
...
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Wininet read php file from internet issue 6 68
Adobe Customization Wizard XI issues 26 166
dog bark java program 15 81
zeroMAx challenge 20 76
There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
This article will show, step by step, how to integrate R code into a R Sweave document
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now