Conversation
optimize matrix assembly by removing redundant reshaping and copying
|
Was this AI generated? Nothing is being optimized here. The code is equivalent. |
|
haha no im a real person. when gpus are better this could be a bottle neck at high FPS. so why not change it now? edit: after checking who you are, i decided to do a real test to be 100% sure. it is way more probable that you are right :) |
|
I haven't memory profiled the code but wrapping in a np.array should be a no-op and the same reshape is happening. Afaict there's not a copy being replaced with an in-place operation. Admittedly it's been a few years since I've worked with numpy but I would be blown away if inlining that variable (the core of the change) would reduce memory. It should just be a pointer to the same memory. I've just been getting / seeing a number of ai generated prs that don't do what they claim so maybe I'm touchy / overstepping. |
optimize matrix assembly by removing redundant reshaping and copying