alamb commented on PR #14697: URL: https://github.com/apache/datafusion/pull/14697#issuecomment-2661397049
> Hi, @alamb. > > In addition, thank you very much for your help, but I have tried some suggestions in #14610 to reduce memory copy by using the `write!`, but I have not achieved any results. I think there may be the following problems: > > * By looking at the source code, the implementation of the `write!` seems to be the same as `append_value`, and is also implemented by calling `append_slice`. There is still a memory copy here, and using `write!` does not seem to have any special meaning. > * When using the following method for loop insertion, there seems to be no performance advantage when the number of loops is too large, because the `str::repeat` reduces the number of loops through exponential copying (although there are still more memory allocations here). That is an interesting finding -- I see that std::String::repeat uses slice::repeat which seems quite optimized. Thanks for testing it out. If avoiding the allocation doesn't help then that is the end of that -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
