What This Calculator Does
An order preserver check compares two lists. The first list is the trusted order. The second list is the produced order. The tool finds whether shared items keep their relative position. It also reports missing items, extra items, inversions, and displacement.
This is useful for workflows that depend on rank. Search results, task queues, playlists, shipment steps, approval chains, and learning paths often need stable order. A small swap may be harmless. Many swaps may show a serious process issue.
Why Order Preservation Matters
Order is not only about sorting. It is about relationships between pairs. If item A should come before item B, the output should keep that pair in the same order. The calculator reviews every comparable pair. It counts pairs that remain correct. It also counts pairs that are reversed.
The preservation score gives a quick quality signal. A score near one hundred means the output closely follows the source. A lower score means more items moved across each other. Kendall tau adds another view. It ranges from negative to positive values. Positive values show agreement. Negative values show reverse behavior.
Advanced Metrics Explained
The longest ordered subsequence shows how much of the output can stay without reordering. Average displacement shows how far matched items moved from their ideal rank. Maximum displacement highlights the worst movement. Inversion examples show the exact pairs causing the score drop.
Duplicate handling changes the analysis. Occurrence mode treats repeated items as separate entries. Unique mode keeps the first appearance only. Case sensitivity also matters. Turn it off when SKU case, name case, or spelling style should not change matching.
How To Read The Results
Start with matched items. Low matching means the lists do not share enough data. Then review the preservation score and inversion count. Next, scan missing and extra entries. Finally, inspect the inversion examples. They show practical fixes. For best results, clean both lists before comparing. Use one item per line when possible. Keep labels consistent across both lists.
Common Use Cases
Teams can test ranked exports, package steps, menu sorting, lesson order, and approval queues. The same method helps audits, migrations, and data reviews because it explains movement with simple pair counts clearly.