class

Mrcv::Search::Bisection

Inherits Reference < Object

Implements binary bisection search to discover the lowest passing compiler version in O(log N) invocations.

Constructors

new(runner : Runner::Base, cache : Hash(Core::Version, Core::ExecutionResult) = Hash(Core::Version, Core::ExecutionResult).new)
Source

Instance methods

cache
Source
find_floor(candidates : Array(Core::Version), target : Core::ProjectTarget, mode : Core::ExecutionMode = Core::ExecutionMode::Fast) : Tuple(Core::Version | Nil, Int32 | Nil)

Finds the lowest working compiler floor version and its candidate index. Returns Tuple(Core::Version?, Int32?) where both are nil if no candidate passed.

Source
find_floor_index(candidates : Array(Core::Version), target : Core::ProjectTarget, mode : Core::ExecutionMode = Core::ExecutionMode::Fast) : Int32 | Nil

Returns only the candidate floor index or nil if no candidate passed.

Source
find_floor_version(candidates : Array(Core::Version), target : Core::ProjectTarget, mode : Core::ExecutionMode = Core::ExecutionMode::Fast) : Core::Version | Nil

Returns only the candidate floor version or nil if no candidate passed.

Source
runner
Source