diff -up diffutils-3.3/src/analyze.c.me diffutils-3.3/src/analyze.c --- diffutils-3.3/src/analyze.c.me 2022-12-13 23:52:03.027335306 +0100 +++ diffutils-3.3/src/analyze.c 2022-12-13 23:56:10.918974724 +0100 @@ -575,11 +575,12 @@ diff_2_files (struct comparison *cmp) ctxt.heuristic = speed_large_files; /* Set TOO_EXPENSIVE to be approximate square root of input size, - bounded below by 256. */ + bounded below by 4096. 4096 seems to be good for + circa-2016 CPUs; see Bug#16848 and Bug#24715 */ too_expensive = 1; for (; diags != 0; diags >>= 2) too_expensive <<= 1; - ctxt.too_expensive = MAX (256, too_expensive); + ctxt.too_expensive = MAX (4096, too_expensive); files[0] = cmp->file[0]; files[1] = cmp->file[1];