On Thu, 20 Apr 2023 at 18:46, Richard Guo <guofengli...@gmail.com> wrote: > > > On Thu, Apr 20, 2023 at 6:38 AM David Rowley <dgrowle...@gmail.com> wrote: >> >> That function is pretty new and was exactly added so we didn't have to >> write list_truncate(list_copy(...), n) anymore. That gets pretty >> wasteful when the input List is long and we only need a small portion >> of it. > > I searched the codes and found some other places where the manipulation > of lists can be improved in a similar way.
I'd be happy to discuss our thought about List inefficiencies, but I think to be fair to Miroslav, we should do that somewhere else. The list_copy_head() discussion was directly related to his patch due to the list of list_truncate(list_copy(..), ..). The other things you've mentioned are not. Feel free to start a thread and copy me in. David