You are here

private function Differ::calculateEstimatedFootprint in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/sebastian/diff/src/Differ.php \SebastianBergmann\Diff\Differ::calculateEstimatedFootprint()

Calculates the estimated memory footprint for the DP-based method.

Parameters

array $from:

array $to:

Return value

integer

1 call to Differ::calculateEstimatedFootprint()
Differ::selectLcsImplementation in vendor/sebastian/diff/src/Differ.php

File

vendor/sebastian/diff/src/Differ.php, line 250

Class

Differ
Diff implementation.

Namespace

SebastianBergmann\Diff

Code

private function calculateEstimatedFootprint(array $from, array $to) {
  $itemSize = PHP_INT_SIZE == 4 ? 76 : 144;
  return $itemSize * pow(min(count($from), count($to)), 2);
}