1.

How to calculate the run time of a code?(a) Start time – End time(b) End time – Start time(c) Start time/ End time(d) Start time * End timeI had been asked this question in an interview.I'm obligated to ask this question of JavaScript Benchmarking and Logging with perfLogger in chapter Parsing, Benchmarking and Logging of JavaScript

Answer»

Right choice is (b) END TIME – Start time

The best I can explain: Run-time statements use the static resources created by compile-time statements, but can also create, use, and destroy dynamic resources at run time. The run time of code can be CALCULATED as:

run time = end time – start time



Discussion

No Comment Found

Related InterviewSolutions