Benchmark fast cover optimize vs k=200

dev
Jennifer Liu 2018-07-25 17:53:38 -07:00
parent d1fc507ef9
commit 1e85f314d8
2 changed files with 53 additions and 29 deletions

View File

@ -15,37 +15,41 @@ make ARG="in=../../../lib/dictBuilder in=../../../lib/compress"
###Benchmarking Result: ###Benchmarking Result:
github: github:
| Algorithm | Speed(sec) | Compression Ratio | | Algorithm | Speed(sec) | Compression Ratio |
| ------------- |:-------------:| ------------------:| | ------------------|:-------------:| ------------------:|
| nodict | 0.000004 | 2.999642 | | nodict | 0.000004 | 2.999642 |
| random | 0.135459 | 8.786957 | | random | 0.148247 | 8.786957 |
| cover | 50.341079 | 10.641263 | | cover | 56.331553 | 10.641263 |
| legacy | 0.866283 | 8.989482 | | legacy | 0.917595 | 8.989482 |
| fastCover | 13.450947 | 10.215174 | | fastCover(opt) | 13.169979 | 10.215174 |
| fastCover(k=200) | 2.692406 | 8.657219 |
hg-commands hg-commands
| Algorithm | Speed(sec) | Compression Ratio | | Algorithm | Speed(sec) | Compression Ratio |
| ------------- |:-------------:| ------------------:| | ----------------- |:-------------:| ------------------:|
| nodict | 0.000020 | 2.425291 | | nodict | 0.000007 | 2.425291 |
| random | 0.088828 | 3.489515 | | random | 0.093990 | 3.489515 |
| cover | 60.028672 | 4.131136 | | cover | 58.602385 | 4.131136 |
| legacy | 0.852481 | 3.911896 | | legacy | 0.865683 | 3.911896 |
| fastCover | 9.524284 | 3.977229 | | fastCover(opt) | 9.404134 | 3.977229 |
| fastCover(k=200) | 1.037434 | 3.810326 |
hg-changelog hg-changelog
| Algorithm | Speed(sec) | Compression Ratio | | Algorithm | Speed(sec) | Compression Ratio |
| ------------- |:-------------:| ------------------:| | ----------------- |:-------------:| ------------------:|
| nodict | 0.000004 | 1.377613 | | nodict | 0.000022 | 1.377613 |
| random | 0.621812 | 2.096785 | | random | 0.551539 | 2.096785 |
| cover | 217.510962 | 2.188654 | | cover | 221.370056 | 2.188654 |
| legacy | 2.559194 | 2.058273 | | legacy | 2.405923 | 2.058273 |
| fastCover | 51.132516 | 2.124185 | | fastCover(opt) | 49.526246 | 2.124185 |
| fastCover(k=200) | 9.746872 | 2.114674 |
hg-manifest hg-manifest
| Algorithm | Speed(sec) | Compression Ratio | | Algorithm | Speed(sec) | Compression Ratio |
| ------------- |:-------------:| ------------------:| | ----------------- |:-------------:| ------------------:|
| nodict | 0.000005 | 1.866385 | | nodict | 0.000019 | 1.866385 |
| random | 1.035220 | 2.309485 | | random | 1.083536 | 2.309485 |
| cover | 930.480173 | 2.582597 | | cover | 928.894887 | 2.582597 |
| legacy | 8.916513 | 2.506775 | | legacy | 9.110371 | 2.506775 |
| fastCover | 116.871089 | 2.525689 | | fastCover(opt) | 116.508270 | 2.525689 |
| fastCover(k=200) | 12.176555 | 2.472221 |

View File

@ -373,7 +373,8 @@ int main(int argCount, const char* argv[])
} }
} }
/* for fastCover */
/* for fastCover (optimizing k) */
{ {
ZDICT_fastCover_params_t fastParam; ZDICT_fastCover_params_t fastParam;
memset(&fastParam, 0, sizeof(fastParam)); memset(&fastParam, 0, sizeof(fastParam));
@ -390,6 +391,25 @@ int main(int argCount, const char* argv[])
} }
} }
/* for fastCover (with k provided) */
{
ZDICT_fastCover_params_t fastParam;
memset(&fastParam, 0, sizeof(fastParam));
fastParam.zParams = zParams;
fastParam.splitPoint = 1.0;
fastParam.d = 8;
fastParam.f = 23;
fastParam.k = 200;
fastParam.steps = 40;
fastParam.nbThreads = 1;
const int fastOptResult = benchmarkDictBuilder(srcInfo, maxDictSize, NULL, NULL, NULL, &fastParam);
if(fastOptResult) {
result = 1;
goto _cleanup;
}
}
/* Free allocated memory */ /* Free allocated memory */
_cleanup: _cleanup:
UTIL_freeFileList(extendedFileList, fileNamesBuf); UTIL_freeFileList(extendedFileList, fileNamesBuf);