Hongmu Notes

🗑️ Array deduplication

Paste a set of data, remove duplicates with one click, and retain the order of first occurrence.

Array deduplication

Paste the list into the input box below (separated by spaces, tabs, or newlines), and click "Remove Duplicates" to get the result with duplicates removed.

Instructions for use

  • Spaces, tabs, and newlines are all delimiters, and they can also be used directly when copying an entire column from a table.
  • The results retain the order of first occurrence and are case-sensitive. A and a are treated as two items.
  • The result box is read-only. Click "Copy Results" to remove it. You can also press and hold on your mobile phone to select all and copy them.

Array uniqueization

Uniqueness is to turn a "possibly duplicated set" into a "guaranteed non-duplicate set". Unlike sorting, uniqueization does not change the relative order of items, so it can be safely used for data where "sequence makes sense", such as action sequences in operation logs.

📌 Processing capacity and performance

Conventional lists with thousands of items can be processed instantly; when pasting tens of thousands of items at a time, the main time spent is rendering the long text itself in the browser, rather than deduplicating calculations. In this case, it is divided into two or three batches according to the module, and the result is exactly the same as that of one-time processing.

⚙️ More valuable when order makes sense

  • After the operation sequence is deduplicated, the sequence relationship is still retained, which facilitates the analysis process.
  • The tag list will not be disrupted after deduplication, and the corresponding relationship will be clear when pasted back to the original text.
  • After deduplication, the numbered list can be checked one by one in the original order to avoid missing items.

✅ Works with sorting tools

When you need a tidy list, first remove duplicates to obtain unique items, and then use the sorting tool to arrange them alphabetically or numerically; do not reverse the order of these two steps, otherwise although the result will be the same after sorting and then removing duplicates, the duplicate distribution will not be clear during the first check.

All keywords and tutorials 12

❓ FAQ

Will it be very slow if there are tens of thousands of items?
The deduplication calculation itself is fast, and the bottleneck is rendering the text in the browser. If it is obviously slow, divide the data into several segments and process them separately. Finally, put the results of the several segments together and remove the duplicates as a whole.
Can the results be guaranteed not to be repeated?
Can. The tool has marked each item, and items that have appeared will not be written into the results again; the status line will also report the number of deleted duplicates to facilitate secondary confirmation.
How many items can be processed at one time
Normally, thousands of items are smooth; if you paste tens of thousands of items at a time, the browser will slow down in rendering the text. It is recommended to remove duplicates in batches and then merge them. The result will be the same as one-time processing.