06-19-2012 03:37 AM
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
06-19-2012 03:46 AM
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.
06-19-2012 06:46 AM
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