You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following snippet, of critical performance importance when working with sum types, generates an inefficient copy, even though it can be seen that lifetimes are bounded in such a way that the copy can become a move:
type X =object
s*: seq[byte]
procf(): X =X(s: newSeq[byte](1024*1024*1024))
let v =f().s
Yeah, ORC is affected too, I checked before. In moveOrCopy, nkCallKinds is supplied with genSink. Perhaps we can treat the extracting fields etc. the same way as the nkCallKinds.
lent is unrelated / orthogonal to this issue - it should should make no difference since the contents should be moved out which lent doesn't materially affect
Description
The following snippet, of critical performance importance when working with sum types, generates an inefficient copy, even though it can be seen that lifetimes are bounded in such a way that the copy can become a move:
Notably, the same applies to any "last use" of a variable:
Of course, in the real world, this applies most significantly to
Option
and its ilk:Nim Version
1.6, 2.0, devel....
Current Output
No response
Expected Output
No response
Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: