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

perf(dict): Bypass vars when possible #254

Merged
merged 2 commits into from May 20, 2021
Merged

perf(dict): Bypass vars when possible #254

merged 2 commits into from May 20, 2021

Commits on May 19, 2021

  1. refactor(dict): Make feature flag paths clearer

    Ed Page committed May 19, 2021
    Copy the full SHA
    d65fa79 View commit details
    Browse the repository at this point in the history
  2. perf(dict): Bypass vars when possible

    Variant support slows us down by 10-50$.  I assume most people will run
    with `en` and so most of this overhead is to waste.  So instead of
    merging vars with dict, let's instead get a quick win by just skipping
    vars when we don't need to.  If the assumptions behind this change over
    time or if there is need for speeding up a specific locale, we can
    re-address this.
    
    Before:
    ```
    check_file/Typos/code   time:   [35.860 us 36.021 us 36.187 us]
                            thrpt:  [8.0117 MiB/s 8.0486 MiB/s 8.0846 MiB/s]
    check_file/Typos/corpus time:   [26.966 ms 27.215 ms 27.521 ms]
                            thrpt:  [21.127 MiB/s 21.365 MiB/s 21.562 MiB/s]
    ```
    After:
    ```
    check_file/Typos/code   time:   [33.837 us 33.928 us 34.031 us]
                            thrpt:  [8.5191 MiB/s 8.5452 MiB/s 8.5680 MiB/s]
    check_file/Typos/corpus time:   [17.521 ms 17.620 ms 17.730 ms]
                            thrpt:  [32.794 MiB/s 32.999 MiB/s 33.184 MiB/s]
    ```
    
    This puts us inline with `--no-default-features --features dict`
    
    Fixes crate-ci#253
    Ed Page committed May 19, 2021
    Copy the full SHA
    b99f32d View commit details
    Browse the repository at this point in the history