Repository navigation
PopLDdecay v3.45
Performance & Memory Optimization:
- CPU: ~5% reduction vs v3.43 (TF=1 -MaxDist 10, BB.vcf.gz 495K SNPs × 57 samples)
- Memory: ~34% RSS reduction (160 MB → 106 MB)
Key changes:
- istringstream → strtoll() for position/genotype parsing
- GetBestBase: pass-by-value → const & with find()
- ostringstream → char lookup / int2str for single-digit conversion
- Inlined TF=1 hot-loop kernel (eliminated statementVar + function call overhead)
- Local variable storage for _MB function variants
- Added missing pclose() in EHH routine
Correctness fixes (output verified bit-identical for TF=1..8 on VCF & Genotype):
- typedef int llong → long long (fixes position overflow >2^31)
- Memory leak fix: delete[] RRNum[InInt] last row in PairWiseComNewOUT_A
- UB fix: memset(Var.DDE, 0, sizeof(Var.DDE)) in all _MA functions
- Removing 5x unreachable break; after return
- Removing if (D_A == 0.0) D_A = 0.0 no-op
Code cleanup:
- Removed ~180 lines of dead/commented-out code
- Unified version number to v3.45