05-07-2012 04:33 AM
still cant work
05-07-2012 04:42 AM
@TiTou wrote:
you'd be slower on large arrays 😛
Can you explain how it would be slower depending on the array size?
05-07-2012 04:43 AM
@nyp123 wrote:
still cant work
What is the problem you are facing now?
05-07-2012 04:44 AM
i took method 1! this is just what i need! Thanks!
now i need to show the column of "2000776707"...any ways?
05-07-2012 04:56 AM
I suspect you wouldn't see any difference for small arrays (less than 100 000 values) and also the diffence between the 2 methods would tend to be smaller as the number of NaN increases in the array.
I think my solution is quicker because I only test the array once with the "is NaN?" primitive and then my only will only run once for each NaN in the array, whereas your solution will explicitely test each value separately.
That said I could be wrong if the compiler was clever enough to paralelize your for loop
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
05-07-2012 04:56 AM - edited 05-07-2012 04:58 AM
05-07-2012 04:59 AM
As i am required to show the top column of the array like the one in "2000776729" , i cant show it in the array of "2000776729".
05-07-2012 05:00 AM - edited 05-07-2012 05:06 AM
@GerdW wrote:
You could also get rid of the "IsNaN" comparison and search directly for NaNs. No need for creating a (large) boolean array...
when i tested that in LV8.6 it was slower (in the case of large array containing a handfull of NaNs) but I guess you must be right now!
We have two ears and one mouth so that we can listen twice as much as we speak.
Epictetus
05-07-2012 05:15 AM
I just made a quick Benchmark for performance.
05-07-2012 05:52 AM - edited 05-07-2012 05:56 AM