LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory/Speed of Split 1D array vs Delete from array

OK, I made a stupid mistake in the last post. I removed the case structure, which removed the timing dependency. I used the 8.6 auto cleanup tool, so I didn't even notice it.
 
Here's another version (8.0), this time hopefully more accurate. In this version, both reshape and delete take some time. The others take no time.
 
Again, I would expect that those two at least could have optimizations for a case like this, but I guess they don't.

___________________
Try to take over the world!
Message 11 of 14
(1,216 Views)
so I've redone my test code and am getting similar results to yours. Now  I just have to make sure my test code is right!

 

Thanks for all the help

Dave

0 Kudos
Message 12 of 14
(1,192 Views)

Yair,

 

You are running all of the benchmarks at the same time rather than one after the other. I believe the fighting of the processor will screw up the numbers while more than one is running. Once three have finished the slowest (and still runnning) will then get exclusive access of the CPU and will start to run faster. I will generally make sure the individual test run one afte the other.

 

This image (from the clear as mud thread) illustrates how I do most of my bench-marking.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 13 of 14
(1,188 Views)

You're right. My modification was only a quick one to demonstrate why using a loop is a problem here. That was also the reason for my original mistake.

 

Ideally, the arrays should be allocated first and then each of the subVIs should be tested separately.


___________________
Try to take over the world!
0 Kudos
Message 14 of 14
(1,164 Views)