-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Move small arrays to the stack #43573
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
Conversation
|
Since my branches are part of a fork, I've created a PR comparing this one and the array removal PR immediately before it here: pchintalapudi#5 |
|
cc: @chriselrod |
4843ca0 to
b6cc766
Compare
2cefe0e to
ef9fe95
Compare
|
I think I've squashed that bug and a few others now, and slightly upgraded the stack allocation process itself. Do you think you could try again now @chriselrod? Just as a note, arrays of references aren't currently being stack allocated because I haven't figured out how to make stack allocation play nicely with the garbage collector yet. |
The vectors contain structs wrapping I see no difference in allocations. |
|
I tried the code here to resolve TTFP in #43725. |
|
This seems stalled, but it's really cool, can we push this through the goal line? |
|
This also need some examples / benchmarks to show the effect. |
|
We have abandoned this work for now in order to focus on some other work. There were some correctness concerns around the changes in |
Stack allocation of small arrays can reduce GC pressure and occasionally expose additional optimization opportunities to LLVM.