Re: Replace array row in a loop

2004-06-11 Thread Rolf Kalbermatter
Mihai Costache [EMAIL PROTECTED] wrote: long explanation snipped It's all very nice, except it takes 20 minutes (Pentium III 800MHz Win2K LV7.1)! I then replace the FOR loop with a formula node and inside that a workmate of mine writes the corresponding C code to do exactly the same job. Now it

RE: Replace array row in a loop

2004-06-10 Thread Dan Press
I'm not sure why, but that feedback node slows things down tremendously. When I use a regular shift register, it is very fast. I performed the simple test of initializing a 256,000x4 element 2D array of SGL with NaN and then replacing the first 93,000 rows with {0,1,2,3}. What's with the

RE: Replace array row in a loop

2004-06-10 Thread Mihai Costache
) Subject: Re: Replace array row in a loop Mihai Costache [EMAIL PROTECTED] wrote: long explanation snipped It's all very nice, except it takes 20 minutes (Pentium III 800MHz Win2K LV7.1)! I then replace the FOR loop with a formula node and inside that a workmate of mine writes

Replace array row in a loop

2004-06-09 Thread Mihai Costache
I am processing the data coming out of a laser scanner. I set the scanner for let's say 512 lines x 500 points/line, so I should get the coordinates of 256,000 points. For reasons known only to my laser scanner, the number of points actually returned is much smaller, for instance approx. 93,000 on

RE: Replace array row in a loop

2004-06-09 Thread Mihai Costache
-Original Message- From: Bruce Ammons [mailto:[EMAIL PROTECTED] Sent: Thursday, 10 June 2004 3:58 p.m. To: 'Mihai Costache' Subject: RE: Replace array row in a loop By any chance, would it be faster if you swapped rows and columns in your 2D array? I always get confused which

RE: Replace array row in a loop

2004-06-09 Thread Michael Aivaliotis
Well, I assume you have a loop within a loop? You iterate 93000 times for every row in your 256000 array? 23billion iterations, yes, this would be slow. Even on my 2.2GHz Pentium4 it takes 2-3 minutes. The proper way is to just iterate once through your data and determine where to plug it into

RE: Replace array row in a loop

2004-06-09 Thread Michael Aivaliotis
I wonder if we're talking about the same thing here. I performed the test you indicate below and in addition created a 4 column array and replaced all 256,000 rows. It only took 165ms on my computer. Granted I have a faster computer but how long does it take on yours? Also, what version of