Any help is needed

Sorting algorithm + Visual basic = Confuse

Page 1 of 1

11 Replies - 946 Views - Last Post: 14 September 2008 - 09:49 AM Rate Topic: -----

#1 oasisjoel  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 274
  • Joined: 11-September 08

Any help is needed

Posted 11 September 2008 - 11:08 AM

Hi
I would like to know how could I get or compute the efficiency of my code in visual basic?

I need to know the efficiency of my code because I am trying to compare my sorting algorithm to other existing sorting algorithm..

I try to implement my sorting algorithm using visual basic.. I would like to know how the difference of efficiency between my sorting algorithm to other sorting algorithm..


Hope you could help guys, Ty so much.... God Bless

P.S.
That is my Thesis any idea or comment about sorting algorithm implemented in visual basic would be appreciated. I also tried to implement my algorithm in turbo C. :^:

Btw im using visual basic 6.0

Is This A Good Question/Topic? 0
  • +

Replies To: Any help is needed

#2 oasisjoel  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 274
  • Joined: 11-September 08

Re: Any help is needed

Posted 12 September 2008 - 09:09 AM

Any help will be nice ty
Was This Post Helpful? 0
  • +
  • -

#3 AmitTheInfinity  Icon User is offline

  • C Surfing ∞
  • member icon

Reputation: 119
  • View blog
  • Posts: 1,563
  • Joined: 25-January 07

Re: Any help is needed

Posted 12 September 2008 - 09:19 AM

Well there are methods to find out the efficiency of your code. These are not technology based, you can apply these rules to codes from any language. There are two main factors in it, Time complexity and Space Complexity. Efficient algorithms keeps both of them as low as possible.

This being a very good topic, I would give you this link for more information instead of explaining it all here.

Also informative :
http://www.leda-tuto...ch02s02s03.html
Was This Post Helpful? 0
  • +
  • -

#4 oasisjoel  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 274
  • Joined: 11-September 08

Re: Any help is needed

Posted 12 September 2008 - 09:53 AM

Thanks I am reading it right now

By the way I tried a software that actually try to compute the runtime of your code.. The name of the software is "VB Watch Profiler"


Here is the link if you want to try the software VB Watch Profiler
Was This Post Helpful? 0
  • +
  • -

#5 oasisjoel  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 274
  • Joined: 11-September 08

Re: Any help is needed

Posted 12 September 2008 - 10:01 AM

Computing for time complexity and space complexity is quite hard.. I do not have any clue where to start.. T_T
Was This Post Helpful? 0
  • +
  • -

#6 oasisjoel  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 274
  • Joined: 11-September 08

Re: Any help is needed

Post icon  Posted 12 September 2008 - 10:39 AM

New D.I.C Head

*
Joined: Yesterday, 11:01 AM
Posts: 7

Hi
I would like to know how could I get or compute the efficiency of my code in visual basic?

I need to know the efficiency of my code because I am trying to compare my sorting algorithm to other existing sorting algorithm..

I try to implement my sorting algorithm using visual basic.. I would like to know how the difference of efficiency between my sorting algorithm to other sorting algorithm..


Hope you could help guys, Ty so much.... God Bless

P.S.
That is my Thesis any idea or comment about sorting algorithm implemented in visual basic would be appreciated. I also tried to implement my algorithm in turbo C. icon_up.gif

Btw im using visual basic 6.0
Was This Post Helpful? 0
  • +
  • -

#7 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4405
  • View blog
  • Posts: 12,262
  • Joined: 18-April 07

Re: Any help is needed

Posted 12 September 2008 - 04:39 PM

There are many ways you can test efficiency and they all have their contexts. So I am going to give you some terms and methodologies for testing various aspects of your code and you can just which ones you want to focus on.

1) Big O notation - A way of describing how an algorithms input size can effect the performance of a given algorithm in timing and efficiency. This is a prime tool in the measure of determining which loop or which algorithm is more effecient and has a faster "timing" that another.

2) Cyclomatic Complexity Analysis - Wow a big phrase for a relatively simple idea. Here we are measuring the number of routes, the efficiency of those routes, and the overall complexity of a given algorithm or piece of code. Typically this is through the use of graph theory or simply counting the number of branches of execution through a piece of code. Below is a site you can use to read up on it...

Cyclomatic Code Complexity Analysis

3) Pure timing - This is a simple and straight forward test where you start a timer (in the code) before you run the code you want to test and then record the time after the code you wanted to test runs. The execution time is the end time subtract the start time.

4) Unit testing tools - These are tools / software that you can use to test individual pieces of code for all sorts of things including many of the tests I describe above. These might be some tools you want to look for to help you conduct your tests and get quantifiable results for your thesis paper. This can include charts etc generated for you.

Just some things to look into for your thesis. Good luck. :)
Was This Post Helpful? 1
  • +
  • -

#8 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1642
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Any help is needed

Posted 12 September 2008 - 04:43 PM

Please don't create duplicate topics, you have this same topic in the Visual Basic Forum. Merged :)
Was This Post Helpful? 0
  • +
  • -

#9 oasisjoel  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 274
  • Joined: 11-September 08

Re: Any help is needed

Posted 13 September 2008 - 10:04 AM

Thank you so much Martyr2... That would be a big help for me.. Sorry for the double post.. Tnx again guys
Was This Post Helpful? 0
  • +
  • -

#10 oasisjoel  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 274
  • Joined: 11-September 08

Re: Any help is needed

Posted 13 September 2008 - 10:24 AM

By the way, Ill keep in touch with you guys if I need more help about my thesis.. For now I am planning to implement my sorting algorithm in Visual Basic and C.. What you think of my plan??
Any comment or suggestion guys?
And by the way my existing algorithm is Bubble sort. . .
Was This Post Helpful? 0
  • +
  • -

#11 Ryno173  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 21-August 08

Re: Any help is needed

Posted 13 September 2008 - 07:16 PM

Thava help on my topic please
Was This Post Helpful? 0
  • +
  • -

#12 oasisjoel  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 274
  • Joined: 11-September 08

Re: Any help is needed

Posted 14 September 2008 - 09:49 AM

View PostRyno173, on 13 Sep, 2008 - 07:16 PM, said:

Thava help on my topic please


Can I ask a question, who is "Thava" and whats about your topic? Maybe I could help..
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1