-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setLen(0)
allocates memory causing performance regression
#23742
Comments
Which version doesn't allocate memory in refc? That said, how to measure performance downgradation? Or would you mind checking whether #22690 is the cause |
This is on upgrade from 1.6 to 2.0. In this case it was found by backtracing where allocations are coming from, in a virtual machine, and seeing this line turn up which didn't before.. that said, what could be happening is that in 1.6, the allocation was happening somewhere else before and now doesn't, causing the accounting to change from another line to here, ie maybe before the setLen was a noop because it was operating on an already-allocated seq. ie this might not be a setLen regression per se, but rather part of a broader change in behavior. Anyway, allocating in setLen(0) doesn't make sense - the reason to use #22690 is a good change in general, ie it's causing improvements overall, anecdotally at least (we're still testing). |
Correct! |
Description
https://github.com/status-im/Nim/blob/v2.0.6/lib/system/sysstr.nim#L223
this is a regression from earlier -
setLen
should obvious not allocate anything in this case.mm:orc
is ok.Nim Version
2.0.6/refc
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: