> On Jan 11, 2018, at 8:53 AM, Omar Charif via swift-dev <swift-dev@swift.org> > wrote: > > Hi Michael, > > I have been doing some research on fast string matching algorithm that I > developed recently and I spent some time testing and benchmarking the > algorithm and it seems fine so far. It is slightly similar to the one I > proposed to Swift 3 or 4 months ago, it is doing some processing first to > analyze a big block of text, files or whatever we give it and then it is > ready for matching and referencing the results locations etc … I have written > a C++ version here https://github.com/o-micron/RootsCLI > <https://github.com/o-micron/RootsCLI> >
I’d be interested in any take-aways from your endeavor. I don’t see any description of the algorithm at that link. Do you have one? > This is mainly reached through some maths approximations to each word so that > we can do some sort of hashing to it but not straight hashing … the main idea > is to transform the word to a single double, the way this is done is by > embedding informations about the order of the letters and the size of the > word as a whole > Err, by “double” do you mean a double precision floating point number? Why not a uint64_t? That is, you probably don't care about NaN bit patterns nor having floating-point semantics. > The tests were made with generated file containing permutations of all > possible words etc … > > Would like to know your opinion about it. > > BR, > Omar > > _______________________________________________ > swift-dev mailing list > swift-dev@swift.org > https://lists.swift.org/mailman/listinfo/swift-dev
_______________________________________________ swift-dev mailing list swift-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-dev