Re: Nearest Neighbour / Ternary Search Tree

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Larry/Tony,

Just to let you know, I have implimented the methods you both outlined.
Although I have some more testing ahead, with my initial tests I can
confirm that using Byte Arrays has produced significant speed
improvements.

With the dataset I am testing on, the entries in the array are not
distributed evenly. What I mean by this is that there are no entries
with a 1's count of 0 to 17 or 193 to 225, but a huge amount at around
the 112 point. If I graphed these totals, it would turn out to be a
bell shape. I only mention this as Larry indicated that I would
probably only need to compare about 20% of the entires by eliminating
those with a 1's count of +-22. This would definitely have been the
case if the entries were evenly distributed, but unfortunately for me,
they are not.

However, the code is in place, and I am limiting the compares to those
+- 22. I will continue to test, but can say I'm very happy with the
results I'm seeing currently.

Thanks again to you both and to the others that posted comments, I
appreciate it.

MJ

.



Relevant Pages

  • Re: Hashtable Contains() - byte arrays as keys -
    ... > But that would again mean he will have to iterate and compare each entries ... Assuming I understand his problem (that he needs the byte arrays to ... entries of the arrays. ... The hashcode might be cacheable if the byte arrays are not changed once ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Array comparison
    ... And how do you compare two classes? ... does not explain why it can't compare two like-typed arrays. ... Free Pascal supports operator overloading. ... more inclined to say the reason is lack of customer demand for the feature. ...
    (alt.comp.lang.borland-delphi)
  • Re: Option Compare Statement
    ... both arrays are always the same type. ... compare text,. ... Your first post regarding this in the vb.controls newsgroup was, ... strings, let's say A and B. Then I want to compare their values. ...
    (microsoft.public.vb.general.discussion)
  • Re: A thank you to Larry and a CONTEST
    ... George D wrote: ... Larry had a surplus of new square one cent holders and sent them to 3 entries in the swap. ... However I currently have enough one cent holders and I would like to pass them on to other RCC readers. ...
    (rec.collecting.coins)
  • Re: Similarity searching
    ... a factor of N*log, if the arrays are big you won't in general have to compare to the last element so I don't see the factor of L**2, and I don't see where that C**2 factor is coming from at all. ... There are also sorting algorithms which don't compare each item to every other item, yet still generate a sorted result. ... If electricity comes from electrons, ...
    (comp.lang.fortran)