Re: [swift-evolution] Fast String Comparison From String Arrays

2017-08-01 Thread Omar Charif via swift-evolution
Hello Jon, My algorithm prioritizes time complexity and the cost is the space complexity. Time Complexity Time Complexity O(C), where C = number of matching String pyramids We usually get to compare only the very similar string pyramids together, and the comparison is usually float

Re: [swift-evolution] Fast String Comparison From String Arrays

2017-07-31 Thread Jonathan Hull via swift-evolution
Hi Omar, Could you talk in a little more detail about your algorithm, including space/time complexity? It sounds interesting, but I am having trouble finding the relevant portions in the source code... Thanks, Jon > On Jul 31, 2017, at 1:26 AM, Omar Charif via swift-evolution >

Re: [swift-evolution] Fast String Comparison From String Arrays

2017-07-31 Thread Omar Charif via swift-evolution
The main advantage I introduce is actually no just a substring search, my main goal is to achieve high performance repeated search on the same given array of strings. I have tested my algorithm against something like spotlight for example searching for files etc … Actually my code is a bit

Re: [swift-evolution] Fast String Comparison From String Arrays

2017-07-28 Thread Huon Wilson via swift-evolution
> On Jul 28, 2017, at 05:54, Omar Charif via swift-evolution > wrote: > > Hi, > > I wonder whether there is already a way in Swift to compare a string against > a large string array quickly without using the traditional ways of > comparison. > > Say we have

Re: [swift-evolution] Fast String Comparison From String Arrays

2017-07-28 Thread Michael Ilseman via swift-evolution
This sounds like an interesting idea. The best way to promote this would be to make a Swift package first, so that Swift users can use it right away and we can see how it works in practice. If it has sufficient merit and general applicability, then it makes sense to propose including it in the

Re: [swift-evolution] Fast String Comparison From String Arrays

2017-07-28 Thread Alex Blewitt via swift-evolution
If you're doing something like that, you probably want to end up with some kind of bloom filter. Alex > On 28 Jul 2017, at 13:54, Omar Charif via swift-evolution > wrote: > > Hi, > > I wonder whether there is already a way in Swift to compare a string against > a

[swift-evolution] Fast String Comparison From String Arrays

2017-07-28 Thread Omar Charif via swift-evolution
Hi, I wonder whether there is already a way in Swift to compare a string against a large string array quickly without using the traditional ways of comparison. Say we have ["a", "b", "c", "d"] and we would like to find whether this array contains "a", then we decide to check if we have "b"