02-19-2008 08:52 AM
02-19-2008 10:04 AM
02-19-2008 10:13 AM - edited 02-19-2008 10:13 AM
02-20-2008 01:06 AM
02-20-2008 04:35 AM
Unclebump, I rewrited the code in simple math operations, on whole columns. I don't know if it is faster because I found that the calculations are not the problem at all! They are fast enough in the original version. But we have a loop afterwards (se attachment) that loops through all rows, and if the status column is anything else than zero it adds the row to an resulting array. This takes time! What we want to accomplish is to remove all rows where status=0.
Suggestions on how to do this faster?
PS. I see all those nice .png attachments, how do I make them?
02-20-2008 05:55 AM
02-21-2008 05:50 AM
Thanks, many good ideas there! This should be fun!
I this project I start with an array, around 50 columns and maybe 20000 rows. I want to end with an array also, with maybe 90% as many rows.
I first made queue for the good data, for the fun of it. It's ok to fill the data in the queue, but the consumer loop never stops. In one of the LV examples they destroy the queue when all data is put in, but that gives immediate errors in the consumer loop. I try to look at "queue status" to find the number of elements in the queue, if it is zero and my flag "all_data_put_in" is set it should terminate, maybe I've done some simple error.
To go from queue to array also needs to be done in a good way, not build array again...
The approach to make 1D array of cluster with [status; all_data] as elements and then sort them seems good, but how do I make this array from the original? I think looping through and manually building it should be inefficient.
Ola
02-21-2008 06:41 AM
02-22-2008 01:59 AM
02-22-2008 03:28 AM