2023-12-30 21:35:09 +00:00
|
|
|
# Fast Replace
|
2023-12-30 21:33:54 +00:00
|
|
|
|
2023-12-30 21:35:09 +00:00
|
|
|
This is a testing repo to try and find out what is the fastest way to search and replace a test file.
|
|
|
|
|
|
|
|
## The rules are simple
|
|
|
|
|
|
|
|
All tests must contain 3 programs:
|
|
|
|
|
|
|
|
### A key value generator (called pairs)
|
|
|
|
|
|
|
|
Generate a key/value list where the key is the search value and the value is the replace value.
|
|
|
|
|
|
|
|
Call the generated file `pairs.csv`.
|
|
|
|
|
|
|
|
### A random file generator (called corpus)
|
|
|
|
|
|
|
|
A program that can generate a file with random data mixed with the keys of your previous set.
|
|
|
|
|
|
|
|
Call the random ordered file `corpus.csv`.
|
|
|
|
|
|
|
|
### A random order replacer (called replace)
|
|
|
|
|
|
|
|
- Load the `pairs.csv` file and `corpus.csv`.
|
|
|
|
- Next start a benchmark.
|
|
|
|
- Perform replacements and output to a file called `replaced.csv`.
|
|
|
|
- Stop the benchamark.
|
|
|
|
|
|
|
|
## Conclusions
|
|
|
|
|
|
|
|
Add a `README.md` to the base of your test file to explain the usage of your programs and expose your conclusions.
|