From d914a7a81a7bbbf070ba9fa3fa0f9279121de2c1 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 9 Apr 2026 10:09:28 +0800 Subject: [PATCH] optimizes `setLen` for orc; disabling ranging checks --- lib/system/seqs_v2.nim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/system/seqs_v2.nim b/lib/system/seqs_v2.nim index fefb6e914c..511bb87d82 100644 --- a/lib/system/seqs_v2.nim +++ b/lib/system/seqs_v2.nim @@ -262,8 +262,11 @@ proc setLen[T](s: var seq[T], newlen: Natural) {.nodestroy.} = if xu.p == nil or (xu.p.cap and not strlitFlag) < newlen: xu.p = cast[typeof(xu.p)](prepareSeqAddUninit(oldLen, xu.p, newlen - oldLen, sizeof(T), alignof(T))) xu.len = newlen + + {.push overflowChecks: off.} for i in oldLen..