benchmark: calibrate length of util.diff

500 + 1000 already cover the curve. 2000 doesn’t add
new qualitative insight — it just extends the same curve
further down (another ~3–4× slowdown).

According to https://github.com/nodejs/performance/issues/186
this benchmark takes one minute to conclude a single run.
This should fix it.

PR-URL: https://github.com/nodejs/node/pull/59588
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
This commit is contained in:
Rafael Gonzaga 2025-08-24 17:57:38 -03:00 committed by GitHub
parent f86b652bc8
commit 62c62056ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,7 +5,7 @@ const common = require('../common');
const bench = common.createBenchmark(main, {
n: [1e3],
length: [1e3, 2e3],
length: [500, 1000],
scenario: ['identical', 'small-diff', 'medium-diff', 'large-diff'],
});