Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 15: (25 points) Forcing the order of execution using a flat sequence structure is a useful tool for benchmarking code performance. Using a flat

Problem 15: (25 points) 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 7 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 an Equal? function node to balance out the time required by the similar function in the while loop. The solutions for Problem Set 4 explains why one coding technique is more efficient than the other. 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. (3 points) Describe what the indicators labeled output 2 and output 4 display. What are the units of the displayed values? 3. (16 points) Code and execute the VI shown in Figure 7 ten times, and for each trial record the elapsed times for generating the arrays appearing at the indicators labeled output 1 and output 3. Make a table of the elapsed time measurements and state the maximum, minimum, and average value of the measurements.

image text in transcribed4. (3 points) Based on your answer in part 3, which loop structure is more efficient?

32 constant with the Display Format set to Si notation 10M D ODO TODO ODIO DIA DO DODRIO ODIOIDDIOL DEDIQDIRDIOIDDIDIT DIDDODRIOD DIDIOIDIDO frame ol frame1 frame 2 frame 3 frame 4 output 1 output 3 1932] output 4 output 2 Figure 7: Block diagram for Problem 15. 32 constant with the Display Format set to Si notation 10M D ODO TODO ODIO DIA DO DODRIO ODIOIDDIOL DEDIQDIRDIOIDDIDIT DIDDODRIOD DIDIOIDIDO frame ol frame1 frame 2 frame 3 frame 4 output 1 output 3 1932] output 4 output 2 Figure 7: Block diagram for Problem 15

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

Recommended Textbook for

Pro PowerShell For Database Developers

Authors: Bryan P Cafferky

1st Edition

1484205413, 9781484205419

More Books

Students also viewed these Databases questions

Question

6. What is process reengineering? Why is it relevant to training?

Answered: 1 week ago