LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delete from array without shift registers

Hi,

 

I have a cluster of three (large) arrays. These three arrays together describe certain "events" in my data. The "third" array describes the nature of the event - it can range from 0 to 9. If an event has the code "9", it should be deleted from all three arrays. Of course, one can do this in a for loop, using the "delete from array" function in combination with shift registers.

 

This works fine and gives exactly the result I would like to get.

 

However, if the arrays get larger (say: >10,000 elements), the processing time increases rapidly. This reaches serious problems when the arrays reach above 100,000 elements - processing takes for ever then...

 

Does anyone know of a more efficient way to delete many elements from a very large array?

 

Thanks!

Laurens

0 Kudos
Message 1 of 3
(2,107 Views)

Hi,

 

Welcome to the forums!

 

I would like to give you this thread to look at. It's abour big arrays and many solutions to handle them. They're also benchmarked. Maybe you also could upload your Vi so we can can help you with a solution or improvements on your excisting code.

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 2 of 3
(2,103 Views)

10k elements is nothing. 🙂

 

Delete from array probably requires reallocation of memory making it slower. If there's alot of 9's i'd rebuild/copy the array and skip the 9's instead of deleting.

 

/Y 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 3
(2,085 Views)