Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-44575: [C#] Replace LINQ expression with for loop #44576

Merged

Commits on Oct 30, 2024

  1. Replace LINQ expression with for loop

    For code which repeatedly access columns by name, this LINQ expression
    can currently form part of the hot path. Replace the LINQ with the
    equivelent for loop.
    
    Some numbers from my machine
    
    | Method                  | Mean     | Error     | StdDev    | Gen0   | Allocated |
    |------------------------ |---------:|----------:|----------:|-------:|----------:|
    | GetColumnByIndexLinq    | 67.84 ns | 1.178 ns  | 1.102 ns  | 0.0107 |     136 B |
    | GetColumnByIndexForLoop | 9.428 ns | 0.1334 ns | 0.1114 ns |      - |         - |
    georgevanburgh committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    28f0759 View commit details
    Browse the repository at this point in the history