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

Improve case insensitive search to avoid allocations. #4394

Merged
merged 5 commits into from
Nov 23, 2021

Commits on Sep 29, 2021

  1. Improve case sensitive search to avoid allocations.

    ```
    ❯ benchcmp  before.txt after.txt
    benchmark                                            old ns/op     new ns/op     delta
    Benchmark_LineFilter/default_true_(?i)foo-16         2400          2233          -6.96%
    Benchmark_LineFilter/simplified_true_(?i)foo-16      201           228           +13.13%
    Benchmark_LineFilter/default_false_(?i)foo-16        2443          2376          -2.74%
    Benchmark_LineFilter/simplified_false_(?i)foo-16     185           231           +24.96%
    
    benchmark                                            old allocs     new allocs     delta
    Benchmark_LineFilter/default_true_(?i)foo-16         0              0              +0.00%
    Benchmark_LineFilter/simplified_true_(?i)foo-16      1              0              -100.00%
    Benchmark_LineFilter/default_false_(?i)foo-16        0              0              +0.00%
    Benchmark_LineFilter/simplified_false_(?i)foo-16     1              0              -100.00%
    
    benchmark                                            old bytes     new bytes     delta
    Benchmark_LineFilter/default_true_(?i)foo-16         0             0             +0.00%
    Benchmark_LineFilter/simplified_true_(?i)foo-16      128           0             -100.00%
    Benchmark_LineFilter/default_false_(?i)foo-16        0             0             +0.00%
    Benchmark_LineFilter/simplified_false_(?i)foo-16     128           0             -100.00%
    ```
    
    It's not much but for a billions line it makes a big difference.
    
    Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
    cyriltovena committed Sep 29, 2021
    Configuration menu
    Copy the full SHA
    c8f7677 View commit details
    Browse the repository at this point in the history
  2. typo

    Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
    cyriltovena committed Sep 29, 2021
    Configuration menu
    Copy the full SHA
    faf865d View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2021

  1. Simplified version

    Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
    cyriltovena committed Oct 27, 2021
    Configuration menu
    Copy the full SHA
    ef0c70e View commit details
    Browse the repository at this point in the history
  2. Cleanup

    Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
    cyriltovena committed Oct 27, 2021
    Configuration menu
    Copy the full SHA
    411f707 View commit details
    Browse the repository at this point in the history

Commits on Nov 2, 2021

  1. Configuration menu
    Copy the full SHA
    91740d1 View commit details
    Browse the repository at this point in the history