08Plagiarism detection — performance rewrite·2020

Plagiarism Detection

Rewrote a core algorithm for ~12× speedup, running across millions of documents.

C++ coreSimilarity matching~12x speedupMulti-million docsAlgorithm rewrite
Problem

A plagiarism-detection system used by many universities was too slow at scale.

What I did

On my own initiative, I rewrote the core similarity-matching algorithm — replacing nested loops with a keyword-lookup structure (~9× faster) — then rewrote the core in C++ for production, reaching ~12× (called from the PHP system).

Result

~12× faster detection across a multi-million-document database used at many universities.

Highlights
  • Replaced nested loops with a keyword-lookup structure — ~9× faster detection.
  • Rewrote the core in C++ for production — ~12×, called from the PHP system.
Before
After (C++)~12×
~12×
~12× faster detection across a multi-million-document database used at many universities.