Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Filter by Categories
nmims post
Objective Type Set
Online MCQ Assignment
Question Solution
Solved Question
Uncategorized

1. ________ is a systematic way to examine how much time is spent in different parts of a program.
a) Profiling
b) Monitoring
c) Logging
d) All of the mentioned

View Answer

Answer: a [Reason:] Sometimes profiling becomes necessary as a project grows and layers of code are placed on top of each other.

2. Point out the correct statement :
a) The Rprofiler() function starts the profiler in R
b) Using system.time() allows you to test certain functions or code blocks to see if they are taking excessive amounts of time
c) R must not be compiled with profiler support
d) All of the mentioned

View Answer

Answer: b [Reason:] However, this approach assumes that you already know where the problem is and can call system.time() on it that piece of code.

3. R comes with a ________ to help you optimize your code and improve its performance.
a) debugger
b) monitor
c) browser
d) profiler

View Answer

Answer: a [Reason:] In general, it’s usually a bad idea to focus on optimizing your code at the very beginning of development.

4. The _______ function computes the time (in seconds) needed to execute an expression.
a) system.timedeb()
b) system.time()
c) system.datetime()
d) all of the mentioned

View Answer

Answer: b [Reason:] They system.time() function takes an arbitrary R expression as input and returns the amount of time taken to evaluate the expression.

5. Point out the correct statement :
a) Rprofiler() tabulates how much time is spent inside each function
b) Rprof() keeps track of the function call stack at regularly sampled intervals
c) By default, the profiler samples the function call stack every 2 seconds
d) None of the mentioned

View Answer

Answer: b [Reason:] The profiler is started by calling the Rprof() function.

6. system.time function returns an object of class _______ which contains two useful bits of information.
a) debug_time
b) proc_time
c) procedure_time
d) all of the mentioned

View Answer

Answer: b [Reason:] if there’s an error, gives the time until the error occurred.

7. _________ time is time charged to the CPU(s) for the R expression.
a) elapsed
b) user
c) response
d) all of the mentioned

View Answer

Answer: a [Reason:] Usually, the user time and elapsed time are relatively close, for straight computing tasks.

8. The elapsed time may be ________ than the user time if your machine has multiple cores/processors
a) smaller
b) greater
c) equal to
d) all of the mentioned

View Answer

Answer: a [Reason:] The elapsed time may be greater than the user time if the CPU spends a lot of time waiting around.

9. Parallel processing is done via __________ package can make the elapsed time smaller than the user time.
a) parallel
b) statistics
c) distributed
d) none of the mentioned

View Answer

Answer: a [Reason:] When you have multiple processors/- cores/machines working in parallel, the amount of time that the collection of CPUs spends working on a problem is the same as with a single CPU, but because they are operating in parallel, there is a savings in elapsed time.

10. You can time ________ expressions by wrapping them in curly braces within the call to system.time().
a) smaller
b) longer
c) error
d) all of the mentioned

View Answer

Answer: b [Reason:] If your expression is getting pretty long (more than 2 or 3 lines), it might be better to either break it into smaller pieces or to use the profiler.

Synopsis and Project Report

You can buy synopsis and project from distpub.com. Just visit https://distpub.com/product-category/projects/ and buy your university/institute project from distpub.com