Results 1 to 3 of 3
Thread: Best way to Time Execution
- 06-13-2011, 08:34 AM #1
Best way to Time Execution
Hey Guys,
I am currently going through an Algorithms and Data Structures Book and have written code for a simple Bubble Sort and Selection Sort. However, I want to see the difference in speeds between the two. Currently, they are both in separate methods and I want to test the speed of the methods itself before I call it till after it returns. What is the best way to do this? I was looking online but realized that using a System call to currentTimeMillis() returned a value of 0 for both. What is the most accurate way to measure execution time? I want to be able to time my code from now on so I need the best way and the most versatile so it works on any occasion.
Thanks so much!
Tabish Chasmawala
- 06-13-2011, 09:03 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
- 06-13-2011, 09:20 AM #3
Similar Threads
-
Re-iterate Thread execution after its execution finishes.
By TurtleRock in forum New To JavaReplies: 10Last Post: 11-29-2010, 02:02 PM -
threading execution time question
By centenial in forum Threads and SynchronizationReplies: 4Last Post: 09-09-2010, 05:49 AM -
Need help with Process execution time display
By murali18 in forum New To JavaReplies: 5Last Post: 03-18-2010, 11:19 PM -
How can I improve the execution time of a Java Project
By Ndt in forum Advanced JavaReplies: 25Last Post: 06-28-2008, 05:08 PM -
Method execution time
By javaplus in forum Advanced JavaReplies: 3Last Post: 11-26-2007, 09:51 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks