Performance Measurement

Performance Measurement: It is based on space and time requirements of a particular algorithm. These quantities depend on the compiler and options used, and the system on which the algorithm runs. The space and time needed for compilation are important…


This content originally appeared on DEV Community and was authored by Samanvi Thota

Performance Measurement: It is based on space and time requirements of a particular algorithm. These quantities depend on the compiler and options used, and the system on which the algorithm runs. The space and time needed for compilation are important during program testing. To obtain the run time of a program, we need a clocking procedure. We assume the existence of a program GetTime() that returns the current time in milliseconds.

Suppose if we want to measure the worst-case performance of the sequential search algorithm
we need to follow these:
1.decide on the values of n for which the times are to be obtained
2.determine for each of the above values of the data that exhibit the worst-case behavior.

Algorithm:
SeqSearch(a,x,n)
//search for x in a[1:n]. a[0] is used as additional space.
{
i:=n; a[0] :=x;
while (a[i]=!x) do i := i-1;
return i;
}

click here, for more detailed explanation with example


This content originally appeared on DEV Community and was authored by Samanvi Thota


Print Share Comment Cite Upload Translate Updates
APA

Samanvi Thota | Sciencx (2021-05-06T17:52:56+00:00) Performance Measurement. Retrieved from https://www.scien.cx/2021/05/06/performance-measurement/

MLA
" » Performance Measurement." Samanvi Thota | Sciencx - Thursday May 6, 2021, https://www.scien.cx/2021/05/06/performance-measurement/
HARVARD
Samanvi Thota | Sciencx Thursday May 6, 2021 » Performance Measurement., viewed ,<https://www.scien.cx/2021/05/06/performance-measurement/>
VANCOUVER
Samanvi Thota | Sciencx - » Performance Measurement. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/05/06/performance-measurement/
CHICAGO
" » Performance Measurement." Samanvi Thota | Sciencx - Accessed . https://www.scien.cx/2021/05/06/performance-measurement/
IEEE
" » Performance Measurement." Samanvi Thota | Sciencx [Online]. Available: https://www.scien.cx/2021/05/06/performance-measurement/. [Accessed: ]
rf:citation
» Performance Measurement | Samanvi Thota | Sciencx | https://www.scien.cx/2021/05/06/performance-measurement/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.