11-10-2009 04:49 AM - edited 11-10-2009 04:50 AM
I am working with data from DAQ and I need to append rows. I came with two methods of achieving that and since I work with rather big data blocks I am wondering which approach is more efficient. Thanks for the help.
Solved! Go to Solution.
11-11-2009 04:18 AM
Hi Ceties,
I ran a tes, and it seems method 1 is slightly faster than method 2. For 100000000 iterations, method 1 took 37.4531s, while method 2 took 38.7344s. One of the reasons could be, that you don't need to allocate memory so often (Tools -> Profile ->Show Buffer Allocation).
Best regards,
Stefo
11-11-2009 05:11 AM
Both are "SLOW" methods, and quite the same.
If you need to go a lot faster, initialize a big array and then use the "Replace element" function.
If you have no speed problems the first is the simplest method.
11-11-2009 05:18 AM
Initializing an array and then using Replace Array Subset also needs less amount of memory.
Christian
11-11-2009 05:27 AM
Correction: your two methods are not the same.
For the reason Stefo wrote the first method is a lot faster than the second.
Stefo you did many iterations with a small array.
This is not the case.
If you place a lot bigger array the result will be much different.
11-11-2009 06:01 AM
Pnt, that's correct. If you use significantly bigger arrays, you should see difference much more clearer.
11-11-2009 06:48 AM
11-12-2009 07:15 AM - edited 11-12-2009 07:17 AM
11-12-2009 09:06 AM
11-12-2009 09:15 AM