05-02-2007 01:36 PM
05-02-2007 02:12 PM
Hello Everybody,
my work day is finished i am back online.
let me first applaud all the posts about my problem. i will, first thing in the morning post tomorow the vi itself ( at home i only have LV7.1, the vi is in 8.2 at office). will also clean it up as asked so much.
computer efficiency: i have a normal P4 2GHz with about 2GB ram and other stuff. running windows xp sp2.
about the efficency of the sort: as pointed out already, if one takes a few mega elements in an array, sort is reaching very fast the few seconds, nothing to do about that. in my particular VI, the whole v-Vi without sort takes 600ms, for the array size i have. and the sort itself take about 3000ms.
the fact that it is a cluster rather than an array doesnt take appreciably more computation time. the way i do it specifically here is just indexing the first element an sorting, hoping that then the sort would be only according to this element and not to the whole cluster, therefore saving computer time. (this is a nice tric by Altenbach by the way, in a thread i found from about a year ago)
as pointed out already, this of course takes more memory and a bit more calculation time by itself. and not surprisingly, the overal sort process now takes exactly the same 3000ms (plus minus a few...).
i am now exploring other options like simply NOT sort, but rather merge some previously sorted arrays (in the mother vi) and othe little trics together.
05-03-2007 03:46 AM
05-03-2007 04:01 AM
05-03-2007 08:56 AM
@smercurio_fc wrote:
You know, I still haven't heard anyone refute that 3 seconds is not that unreasonable when sorting an array of clusters of over 2 million elements that takes up, as the posted indicated, over 100 MB, regardless of what the poster might believe. Gabi never indicated what kind of machine they're using, or what else is going on in terms of other processes. I wonder if we're just splitting hairs here...
Hi Smercurio, your point is well taken - but since Gabi's interest was having this run faster, why not see whether a 2X or 10X improvement is possible?
I have no issue with looking at trying to improve an algorithm, regardless of what that algortihm is. My point was that Gabi's original post, and subsequent comments, basically said that he found it increduous that it would take a computer "3 seconds!!" or "3000 msec!!!" (exclamation points quoted as posted) to sort an array of clusters of over 2 million elements hovering at about 100 MB. As I indicated, using the stock Sort 1D array on my 3GHz P4 I got 2.7 secs. I simply don't find this result that hard to believe. It's one thing to say, "hey, is it possible to improve this". It's another to say that it's simply not possible to believe that it would take this long, implying there must be something inherently wrong with the Sort 1D Array function.
05-04-2007 12:44 PM