Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Forcing the order of execution using a flat sequence structure is a useful tool for benchmarking code performance Using a flat sequence structure along with

image text in transcribedimage text in transcribed

Forcing the order of execution using a flat sequence structure is a useful tool for benchmarking code performance Using a flat sequence structure along with tick count function nodes allows the user to determine the execution time of code appearing within a sequence frame. As an example, Figure 8 shows two methods for creating a 1D array of 32-bit signed integers. One approach uses a for loop, while the second uses a while loop. It turns out that one of these approaches takes less time to execute than the other, even taken into account that the for loop contains arn Equal? function node to balance out the time required by the similar function in the while loop. In this exercise, you will use the flat sequence structure to determine execution time of both loop structures 1. (3 points) The for loop and while loop structures use auto-indexing tunnels to generate 1D arrays of signed 32-bit integers. How many elements are in the 1D arrays displayed by the indicators labeled output 1 and output 3? 2. (6 points) Describe what the indicators labeled output 2 and output 4 display. What are the units of the displayed values? 3. (6 points) Does the execution time of the function node Decrement, that appears outside the sequence structure, affect the values displayed by the indicators labeled output 2 and output 4? Justify your answer using one or two sentences 4. (12 points) Code and execute the VI shown in Figure 8 ten times, and for each trial record the elapsed time for generating the array. Make a table of the elapsed time measurements and state the maximum, minimum, and average value of the measurements 5. (3 points) Based on your answer in part 4, which loop structure is more efficient? Forcing the order of execution using a flat sequence structure is a useful tool for benchmarking code performance Using a flat sequence structure along with tick count function nodes allows the user to determine the execution time of code appearing within a sequence frame. As an example, Figure 8 shows two methods for creating a 1D array of 32-bit signed integers. One approach uses a for loop, while the second uses a while loop. It turns out that one of these approaches takes less time to execute than the other, even taken into account that the for loop contains arn Equal? function node to balance out the time required by the similar function in the while loop. In this exercise, you will use the flat sequence structure to determine execution time of both loop structures 1. (3 points) The for loop and while loop structures use auto-indexing tunnels to generate 1D arrays of signed 32-bit integers. How many elements are in the 1D arrays displayed by the indicators labeled output 1 and output 3? 2. (6 points) Describe what the indicators labeled output 2 and output 4 display. What are the units of the displayed values? 3. (6 points) Does the execution time of the function node Decrement, that appears outside the sequence structure, affect the values displayed by the indicators labeled output 2 and output 4? Justify your answer using one or two sentences 4. (12 points) Code and execute the VI shown in Figure 8 ten times, and for each trial record the elapsed time for generating the array. Make a table of the elapsed time measurements and state the maximum, minimum, and average value of the measurements 5. (3 points) Based on your answer in part 4, which loop structure is more efficient

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions