title: What algorithm is fast and good (optimized) for comparing candidates?
body: <p>I'm using Vim plugin <code>neocomplcache</code>. And I hope a better compare_func for neocomplcache's popup menu candidates.</p>
  
  <p>You can find the default <code>compare_func</code> at <a href="https://github.com/Shougo/neocomplcache/blob/master/autoload/neocomplcache.vim#L1248" rel="nofollow">here</a>.</p>
  
  <p>And here is the <a href="https://github.com/Shougo/neocomplcache/issues/305" rel="nofollow">issue</a> I post on GitHub.</p>
  
  <p>Reference:</p>
  
  <ul>
  <li><a href="https://github.com/Shougo/neocomplcache" rel="nofollow">neocomplcache</a></li>
  </ul>
  
  <p>I'm still newbie on programming, I'm not good on algorithm, basiclly totally do not know the algorithm.
  Anyway, I want to know what algorithm or ways is good for this case.
  And thanks.</p>