Jump to content

Benchmarking Labview algorithms


Recommended Posts

Hey guys

So I'm trying to benchmark a couple of labview algorithms to be able to say something about which is more efficient before I go about trying to expand on that method for my final purpose of image processing.

Here's how I've set it up so far. (Attached Image)

Depending on how I wire the waveform into the sequence part I can get significant differences in the speeds of each algorithm. The first front panel is the result corresponding to the first block diagram. The second front panel corresponds to the second block diagram. Note the only difference is where I wired the waveform into the sequence. Could someone please explain this phenomenon to me? Also any suggestions for a better way to go about this would be much appreciated.

Regards

Alex

post-16778-126031921966_thumb.png

post-16778-126031922637_thumb.png

post-16778-126031937673_thumb.png

post-16778-12603193948_thumb.png

Link to comment

This is a pure guess on my part...

I suspect the increased autocorrelation time you are seeing in the first configuration also includes time needed to copy the waveform data. What happens if you cut the waveform size in half? Does the time difference also get cut in half?

Link to comment

Well I've run that VI for a range of data from 1000 samples in length to 1,000,000. The algorithms are both size dependant, but any differences are obscured by the fact that changing the wiring gives different results, also, in both wiring examples, reversing the order of the VI's in the flat sequence reverses the timing results.

I thought I had an idea about how to benchmark this stuff but I'm clearly missing something crucial.

Link to comment

I think I might genuinely be moderately retarded. I just realised the results swap because they are the same run times but in different fields (which I haven't renamed). I managed to confuse myself into thinking the actual run times were changing. I'm still curious as to why it makes a difference where you wire the wires in though.

Link to comment

I think I might genuinely be moderately retarded. I just realised the results swap because they are the same run times but in different fields (which I haven't renamed). I managed to confuse myself into thinking the actual run times were changing. I'm still curious as to why it makes a difference where you wire the wires in though.

It probably has something to do with the preallocation of memory, these are my theories: If you wire both into the first frame, both arrays are allocated and copied before the first frame executes. If you wire it into a frame in the middle, that frame is responsible for allocating that memory.

In your first example, try wiring in the second copy one frame sooner and then wiring it sideways into the case where its needed and see how that affects your timing.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.