summaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorSean Kurtz <seankurtz75@gmail.com>2026-11-18 18:45:58 -0600
committerSean Kurtz <seankurtz75@gmail.com>2026-11-18 18:45:58 -0600
commitd1cec2ff9aa9f8aaf4ad32f28f4f64e18637417e (patch)
treec5764b240c903010fdd64b9bc5733dcd7f52965c /scripts
parentf32599e10de546a11ed90ee7f50a0dbef8f6df84 (diff)
downloadzash-d1cec2ff9aa9f8aaf4ad32f28f4f64e18637417e.tar.gz
bench: keep the arithmetic totals inside 32 bits
ksh88 works in 32-bit integers, so summing i*2 over 200000 iterations overflowed and the benchmark reported "differs" instead of a time: the same script, two answers. Summing (i % 100) * 2 does the same work and fits in 31 bits.
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions