-
-
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
Inefficient codegen for varargs
, openArray
#22248
Comments
ARC/ORC does not have this problem, maybe you should use it. |
The possibility to not perform a copy here is an outcome of the rules of the language, not orc/arc specifically - if this is fixed for orc/arc but not for refc it would be an indication that the logic could benefit from being moved to a more appropriate abstraction level in the compiler thus improving the compiler architecture, decreasing maintenance overhead and simplifying the codebase - all this in addition to providing benefit to users that use the stable / released version of Nim and that might not be ready for months/years to migrate due to being heavy users of Nim and having a lot of code to re-check. |
The logic was moved into an AST->AST transformation but the old refc code cannot easily make usage of these things because it's old code. And contrary to popular beliefs adding new logic ("features") does not break code but refactorings and bugfixes ("just a patch"). |
well, the compiler is one, its users are many - when it has a bug like this, there's usually economy in fixing it in the compiler rather than requiring that all nim code out there to change to an unreleased development version of a new feature that has yet to go through real world testing - here, the generator is clearly buggy, making this a valid issue to report against refc that perhaps can be fixed and perhaps not. What it does show however is a gap in the logic in the compiler somewhere: nobody benefits from those and they might be indicative of deeper issues. |
Description
clearly, the
copyString
is not neededNim Version
1.6.12, devel (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: