zjregee commented on PR #14697: URL: https://github.com/apache/datafusion/pull/14697#issuecomment-2661339934
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). ```Rust for _ in 0..number { write!(builder, "{}", string)?; } builder.append_value("") ``` -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org