diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2024-08-24 02:07:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-23 20:07:00 +0200 |
commit | 4ef06a5cc56f6ef32b8ac1e7c11592597406486a (patch) | |
tree | 92a6f76567d363560c2347a3e46f25748c2243df /tests/stdlib | |
parent | 446501b53bfbb5aa0322e18967dbd0511ddbee37 (diff) | |
download | Nim-4ef06a5cc56f6ef32b8ac1e7c11592597406486a.tar.gz |
fixes `cast` expressions introduces unnecessary copies (#24004)
It speeds up ```nim proc foo = let piece = cast[seq[char]](newSeqUninit[uint8](5220600386'i64)) foo() ``` Notes that `cast[ref](...)` is excluded because we need to keep the ref alive if the parameter is something with pointer types (e.g. `cast[ref](pointer)`or `cast[ref](makePointer(...))`) --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Diffstat (limited to 'tests/stdlib')
0 files changed, 0 insertions, 0 deletions