Skip to main content
Code Review

Return to Revisions

2 of 2
replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/

You should try to optimize your algoritmic approach to searching, in addition to the JavaScript performance described in Alexey's comment. Your problem is (in most cases) not algoritmically equivalent to hiding every second list item, thus we can make use of an optimized data structure for the problem to take advantage of this. You are searching with "indexOf", which is relatively slow for such a large dataset. Build a suffix array to locate the substrings in your set (see this or this), then hide these elements.

Sirupsen
  • 462
  • 2
  • 7
default

AltStyle によって変換されたページ (->オリジナル) /