change postingsList type

Issue #44 resolved
Shinichiro Abe repo owner created an issue

before: List<int> -> after: Set<int>

indexing speed showed 70x faster from benchmark:

* before
1st
IndexSearcher(RunTime): 173250.0 us.
IndexWriter(RunTime): 504745000.0 us.
2nd
IndexSearcher(RunTime): 159923.07692307694 us.
IndexWriter(RunTime): 507978000.0 us.

* after
1st
IndexSearcher(RunTime): 160461.53846153847 us.
IndexWriter(RunTime):  7198000.0 us.
2nd
IndexSearcher(RunTime): 171416.66666666666 us.
IndexWriter(RunTime): 7181000.0 us.

Comments (4)

  1. Shinichiro Abe reporter

    my powerful machine:

    the indexing speed became 60x faster.

    * before
    1st
    IndexSearcher(RunTime): 28166.666666666668 us.
    IndexWriter(RunTime): 99754000.0 us.
    
    2nd
    IndexSearcher(RunTime): 27739.72602739726 us.
    IndexWriter(RunTime): 100563000.0 us.
    
    * after
    1st
    IndexSearcher(RunTime): 28800.0 us.
    IndexWriter(RunTime): 1668500.0 us.
    2nd
    IndexSearcher(RunTime): 28871.428571428572 us.
    IndexWriter(RunTime): 1664500.0 us.
    
  2. Log in to comment