02-13-2006 10:49 AM
02-13-2006 01:50 PM - edited 02-13-2006 01:50 PM
At least in older versions of LabVIEW, MoveBlock was directly implemented using a loop. I agree that it shouldn't make any difference, but with nowadays C runtime libraries you don't really know how much of overhead there might be added by the use of exception handling and such.
@anotherStefan wrote:
Hi Rolf,
well in fact I tried the MoveBlock function as well but with the same result. In the end I couldn't think of a faster way to move a block of memory then the way provided by memcpy if we stick to C. I suspect MoveBlock will call memcpy internally as well. There must be something I am missing. Regarding my assumption of the time loss as result of task switch: Please ignore that one as when copying larger blocks there is a linear increase in time. For a 4MB block of data the time needed on and average system (P4 2.6GHz) is around 200-250 ms! Hasn't anybody else encountered this problem before? I tried LV 5, 7 and 8 by now and always the performance was extremly poor...
Message Edited by rolfk on 02-13-2006 08:53 PM
02-14-2006 01:38 AM
Thanks a
lot to both of you!
I think I will re-implement it like this to remain compatible (unfortunately
this is a library):
The old VI with the 3 sub-VIs in a case-struct will internally be replaced by
the CIN Rolf suggested, which should be much faster then my original
implementation. The 3 internal VIs can be used stand-alone to achieve maximum
performance for known data types. I really appreciated your patience!
All the best,
Stefan