georgevanburgh opened a new issue, #44575: URL: https://github.com/apache/arrow/issues/44575
### Describe the enhancement requested We've recently been doing some profiling of code that uses the C# Arrow library, and which frequently accesses columns by name in a tight loop - and found the following LINQ expression makes a significant contribution to execution time. https://github.com/apache/arrow/blob/2df7b23af717f505c16fedbef6e4223ac163ac5a/csharp/src/Apache.Arrow/Schema.cs#L81-L86 Obviously there are workarounds for this, such as creating our own cached mapping of column names to ordinals - but it would be nice if the built-in method was a little more efficient. In addition to the use of linq, we're also iterating through `_fieldsList` twice (once to find a match, and then another to find the index of the match). We've also noticed that usage of `StringComparer.CurrentCulture` causes an allocation every time this method is called (assuming a value for `comparer` is not provided). I'm assuming the choice to use a culture-aware comparison by default is intentional? ### Component(s) C# -- 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]
