LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Remove zeroes


@nunu wrote:

Thank you very much guys, one of the given solutions did suit my case and everything works smoothly atm. 


Then you should thank that person with Kudos, and marking their answer and the solution.

0 Kudos
Message 11 of 12
(247 Views)

One thing to keep in mind is that building an array in a loop can be expensive if large arrays are involved, because of the constant need of new memory allocations. This is not a problem with the current sizes, but will slow you down dramatically if very large arrays are involved. Doing the operations in-place can be several orders of magnitude faster.

 

Here is a quick rewrite how you would allocate the array once for the worst case scenario and then trim the excess at the end. This will be much more efficient and will give you much better performance. (Also not that this idea would simplify coding here, so please vote for it. :D)

 

Download All
0 Kudos
Message 12 of 12
(230 Views)