From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Execution Speed Anomaly

I am guessing.   Is the subvi in run mode or  edit mode with copies in the undo stack?


"Should be" isn't "Is" -Jay
0 Kudos
Message 11 of 15
(808 Views)

So it probably was a witch hunt. 😄

 

OK, things become more clear, but the time difference is less than even a factor of two and I doubt it is significant. The timing template has debugging enabled, so allowing the wires inside the loops to be probed adds additional overhead, which could rearrange operations depending on the inline state of the wrapper, for example. OTOH, without debugging enabled, we need to worry more about constant folding.

 

I definitely would rewrite using the "high resolution relative seconds" and use very few iterations, then do a statistical analysis on the results (fastest, average, slowest, etc.). Fewer successive calls is also probably a more realistic use case than just hammering with everything remaining in cache. How big are these arrays?

0 Kudos
Message 12 of 15
(806 Views)

So you are using a millisecond ticker to measure nanoseconds. 

--- Wrote that Template VI in 1993 or so.  It works well.

 

Why not use "high resolution relative seconds"?

--- Not available in LV 2013.

 

What exactly determines the execution speed?

--- Not sure what you mean.  I am measuring the time it takes to replace 100 elements at 100 addresses in an 8192-value DBL array.

 

I probably would not use subroutine priority,

--- I wouldn't either, except that it's faster.

 

Is this running on a PC or on a RT system?

--- Both.  The timing test is on PC, but the code will run on both systems.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 13 of 15
(804 Views)

Why not use "high resolution relative seconds"?

--- Not available in LV 2013.

 

See here

 

You should have it, try install Hidden Gems

 

mcduff

0 Kudos
Message 14 of 15
(790 Views)

Just to wrap this up:

 


@CoastalMaineBird wrote:

So you are using a millisecond ticker to measure nanoseconds. 

--- Wrote that Template VI in 1993 or so.  It works well.

 

That explains the stacked sequence. It was difficult without one on a 640x480 monitor 😄

 

Why not use "high resolution relative seconds"?

--- Not available in LV 2013.

 

 Yes, its available, see other replies.

 

What exactly determines the execution speed?

--- Not sure what you mean.  I am measuring the time it takes to replace 100 elements at 100 addresses in an 8192-value DBL array.

 

OK, now you are giving some size information. Wasn't sure if these array are e.g. gigantic or tiny. This is tiny 😮

 

I probably would not use subroutine priority,

--- I wouldn't either, except that it's faster.

 

There are also drawbacks, see this disucssion

 

Is this running on a PC or on a RT system?

--- Both.  The timing test is on PC, but the code will run on both systems.

 

OK.


In general, your LabVIEW (13) version is quite old and I would not be surprised if newer version behave differently.

0 Kudos
Message 15 of 15
(777 Views)