<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On Jan 11, 2018, at 8:53 AM, Omar Charif via swift-dev &lt;<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Michael,<div class=""><br class=""></div><div class="">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 <a href="https://github.com/o-micron/RootsCLI" class="">https://github.com/o-micron/RootsCLI</a></div><div class=""><br class=""></div></div></div></blockquote><div><br class=""></div><div>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?</div><div class=""><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">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</div><div class=""><br class=""></div></div></div></blockquote><div><br class=""></div><div>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.</div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">The tests were made with generated file containing permutations of all possible words etc …&nbsp;</div><div class=""><br class=""></div><div class="">Would like to know your opinion about it.</div><div class=""><br class=""></div><div class="">BR,</div><div class="">Omar</div><div class=""><br class=""></div></div>_______________________________________________<br class="">swift-dev mailing list<br class=""><a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-dev<br class=""></div></blockquote></div><br class=""></div></body></html>