mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-14 19:45:55 +00:00
ref https://github.com/nim-lang/Nim/issues/25695 ref https://github.com/nim-lang/Nim/pull/25715 This pull request introduces a minor but important change to the `setLen` procedure in `lib/system/seqs_v2.nim`. The main update is the temporary disabling of overflow checks during the initialization loop when extending the sequence length, which can improve performance and avoid unnecessary checks during this operation. Memory and performance improvement: * Disabled overflow checks for the loop that initializes new elements to their default value when increasing the length of a sequence in `setLen`, by wrapping the loop with `{.push overflowChecks: off.}` and `{.pop.}`.