KiddoZhu / FindIt

Super efficient parallel implementation of dynamic dictionary matching

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Find It!

A very fast hash-based dynamic dictionary matching.

Target

Search for all occurances of gram patterns in a given text, supporting online insertion & deletion. I/O are processed in batches, allowing a certain scale of parallelism. See http://sigmod17contest.athenarc.gr/ for more details.

The original competition task is modified slightly by

  • Assume all inputs are ASCII
  • A line with a single 'E' refers to the end of a batch
  • Return a multiset of occurances

Models

Naive Serial

Hash-based serial search algorithm.

Naive Parallel

Hash-based parallel search algorithm.

  • parallel hash processing
  • parallel substring enumeration

OpenMP Parallel

Hash-based parallel search algorithm.

  • parallel hash processing
  • parallel substring enumeration

Powerful Parallel

Hash-based parallel search algorithm

  • parallel hash processing
  • parallel substring enumeration
  • hierarchical map with branch cutting

Data Generator

Generates a batch of insertions, deletions and queries according to the given datasets. Usage can be found in DataGenerator/main.cpp

Results

Evaluated with data generated by literary works from different periods, including Harry Potter series, Jane Eyre, The Iliad, etc. Patterns range from 10 to 50 grams while queries range from 200 to 2000 grams.

Metric: total computation time (s)

(1000+10+10)*100 denotes (#insertion + #deletion + #query) * #batch

Algorithm (1000+10+10)*100 (1000+100+100)*10 (10000+100+100)*10
Naive Serial 5.756 3.966 4.433
Naive Parallel 2.181 1.483 2.502
OpenMP Parallel 1.337 1.076 1.430
Powerful Parallel 0.493 0.119 0.476

on an i5-3320M CPU with 4 threads, using O2 optimization.

Author

Environment

  • Visual Studio 2013
  • Windows 8

About

Super efficient parallel implementation of dynamic dictionary matching


Languages

Language:C++ 98.5%Language:C 1.5%