jorgecarleitao commented on pull request #269: URL: https://github.com/apache/arrow-rs/pull/269#issuecomment-836537502
> Would it make sense to still explore a MutableBuffer<T> where T: NativeType that implements a trait dyn MutableBuffer for the untyped API. Then we can use the trait objects where the type needs to be "forgotten" I _think_ that an issue with `dyn MutableBuffer` is that the compiler is unable to inline function calls (because they are now pointed to from a vtable). I have not measured the performance impact, though, so I can't say for sure. I just know that e.g. the reason `from_trusted_len_iter` is so fast is that things like `from_trusted_len_iter(values.iter().map(|x| x + 2))` are completely inlined, thereby allowing the compiler to convert the "for loop" to a loop over SIMD instructions. > I am sorry if this exercise was a waste of time, but I certainly learned something reading the comment threads. I do not think it was, and I am sorry if I made it sound like it. I do think that we could try to have design discussions on issues prior to PRs, so that we have some opportunity to guide and comment on them before work starts. -- 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. For queries about this service, please contact Infrastructure at: [email protected]
