Re: Help with an algorithm!

2017-06-15 Thread Ivan Kazmenko via Digitalmars-d-learn
On Thursday, 15 June 2017 at 13:41:07 UTC, MGW wrote: On Thursday, 15 June 2017 at 13:16:24 UTC, CRAIG DILLABAUGH wrote: The purpose - search of changes in file system. Sorting is a slow operation as well as hashing. Creation of a tree, is equally in sorting. So far the best result:

Re: Help with an algorithm!

2017-06-15 Thread CRAIG DILLABAUGH via Digitalmars-d-learn
On Thursday, 15 June 2017 at 13:41:07 UTC, MGW wrote: On Thursday, 15 June 2017 at 13:16:24 UTC, CRAIG DILLABAUGH wrote: The purpose - search of changes in file system. Sorting is a slow operation as well as hashing. Creation of a tree, is equally in sorting. So far the best result:

Re: Help with an algorithm!

2017-06-15 Thread MGW via Digitalmars-d-learn
On Thursday, 15 June 2017 at 13:16:24 UTC, CRAIG DILLABAUGH wrote: The purpose - search of changes in file system. Sorting is a slow operation as well as hashing. Creation of a tree, is equally in sorting. So far the best result: string[] rez; foreach(str; m2) { bool fFind; int

Re: Help with an algorithm!

2017-06-15 Thread CRAIG DILLABAUGH via Digitalmars-d-learn
On Thursday, 15 June 2017 at 11:48:54 UTC, Ivan Kazmenko wrote: On Thursday, 15 June 2017 at 06:06:01 UTC, MGW wrote: There are two arrays of string [] mas1, mas2; Size of each about 5M lines. By the size they different, but lines in both match for 95%. It is necessary to find all lines in an

Re: Help with an algorithm!

2017-06-15 Thread Ivan Kazmenko via Digitalmars-d-learn
On Thursday, 15 June 2017 at 06:06:01 UTC, MGW wrote: There are two arrays of string [] mas1, mas2; Size of each about 5M lines. By the size they different, but lines in both match for 95%. It is necessary to find all lines in an array of mas2 which differ from mas1. The principal criterion -

Help with an algorithm!

2017-06-15 Thread MGW via Digitalmars-d-learn
There are two arrays of string [] mas1, mas2; Size of each about 5M lines. By the size they different, but lines in both match for 95%. It is necessary to find all lines in an array of mas2 which differ from mas1. The principal criterion - speed. There are the 8th core processor and it is good