Skip to content

Commit 4aed711

Browse files
committed
do not prefer log eval programs
1 parent 41d9dd9 commit 4aed711

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ To install or update LODA, please follow the [installation instructions](https:/
22

33
## [Unreleased]
44

5+
## v25.5.18
6+
7+
### Enhancements
8+
9+
* Do not prefer log eval program
10+
511
## v25.5.8
612

713
### Enhancements

src/mine/finder.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -307,13 +307,6 @@ bool isBetterIncEval(const Program &existing, const Program &optimized,
307307
evaluator.supportsIncEval(optimized) && !optimized_has_seq);
308308
}
309309

310-
bool isBetterLogEval(const Program &existing, const Program &optimized) {
311-
// optimized version has log complexity, existing does not
312-
return (ProgramUtil::hasOp(existing, Operation::Type::LPB) &&
313-
!Analyzer::hasLogarithmicComplexity(existing) &&
314-
Analyzer::hasLogarithmicComplexity(optimized));
315-
}
316-
317310
std::string Finder::isOptimizedBetter(Program existing, Program optimized,
318311
const OeisSequence &seq, bool full_check,
319312
size_t num_usages) {
@@ -351,13 +344,6 @@ std::string Finder::isOptimizedBetter(Program existing, Program optimized,
351344
return not_better; // worse
352345
}
353346

354-
// check if the optimized program has logarithmic complexity
355-
if (isBetterLogEval(existing, optimized)) {
356-
return "Faster (log)";
357-
} else if (isBetterLogEval(optimized, existing)) {
358-
return not_better; // worse
359-
}
360-
361347
// consider incremental evaluation only for programs that are not
362348
// used by other programs and that don't require a full check
363349
if (!full_check && num_usages < 5) { // magic number

0 commit comments

Comments
 (0)