Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: utkarshkukreti/diff.rs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.1.12
Choose a base ref
...
head repository: utkarshkukreti/diff.rs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.1.13
Choose a head ref
  • 15 commits
  • 10 files changed
  • 1 contributor

Commits on Apr 16, 2022

  1. Configuration menu
    Copy the full SHA
    b9a0ff4 View commit details
    Browse the repository at this point in the history
  2. remove .travis.yml

    utkarshkukreti committed Apr 16, 2022
    Configuration menu
    Copy the full SHA
    1a8471a View commit details
    Browse the repository at this point in the history
  3. cargo fmt

    utkarshkukreti committed Apr 16, 2022
    Configuration menu
    Copy the full SHA
    20c758c View commit details
    Browse the repository at this point in the history
  4. add github workflow

    utkarshkukreti committed Apr 16, 2022
    Configuration menu
    Copy the full SHA
    782d454 View commit details
    Browse the repository at this point in the history
  5. optimize diffing input with long matching prefix, see #15

    The benchmark in this commit speeds up from ~360us to ~210us.
    utkarshkukreti committed Apr 16, 2022
    Configuration menu
    Copy the full SHA
    0f0aa58 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3da8d2d View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2022

  1. add a real-world benchmark using sample files from rust-lang/rust

    Data generated using the following command run on rust-lang/rust#c102c5cf:
    
        $ for sha in `git rev-list HEAD -- .gitignore`; do git show ${sha}:.gitignore >> gitignores.txt; echo '!!!' >> gitignores.txt; done
    utkarshkukreti committed Apr 19, 2022
    Configuration menu
    Copy the full SHA
    7c8212b View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2022

  1. Configuration menu
    Copy the full SHA
    24ded37 View commit details
    Browse the repository at this point in the history
  2. fix tests on windows

    utkarshkukreti committed Apr 22, 2022
    Configuration menu
    Copy the full SHA
    0cebd99 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2022

  1. optimize by using slices instead of generic iterators where possible

    This version allocations a bit more memory up front but is faster in all
    benchmarks, sometimes significantly faster.
    
    group                                                 after                  before
    -----                                                 -----                  ------
    10 equal items                                        1.00   171.8±11.75ns   1.09    187.6±7.73ns
    10 non-equal items                                    1.00  1150.8±36.11ns   1.08  1242.8±36.13ns
    100 equal items                                       1.00   296.0±10.78ns   1.24   366.0±13.09ns
    100 non-equal items                                   1.00     29.2±1.57µs   1.15     33.5±1.38µs
    1000 equal items                                      1.00  1354.9±36.02ns   1.50      2.0±0.06µs
    1000 non-equal items                                  1.00  1868.1±68.60µs   1.24      2.3±0.07ms
    1024 byte string, last 256 different                  1.00    143.9±3.67µs   1.47    212.1±7.86µs
    diff::chars on gitignore files from rust-lang/rust    1.00     68.6±1.99ms   1.46    100.5±2.87ms
    diff::lines on gitignore files from rust-lang/rust    1.00      5.9±0.15ms   3.69     21.7±0.47ms
    empty                                                 1.00    109.1±4.98ns   1.14    124.2±4.88ns
    utkarshkukreti committed Jun 29, 2022
    Configuration menu
    Copy the full SHA
    6402260 View commit details
    Browse the repository at this point in the history
  2. optimize by using a single Vec instead of two-level nested Vec

    group                                                 after                  before
    -----                                                 -----                  ------
    10 equal items                                        1.00    113.1±3.09ns   1.50    169.6±5.33ns
    10 non-equal items                                    1.00   498.5±19.32ns   2.28  1137.9±43.20ns
    100 equal items                                       1.00    257.9±8.30ns   1.14   295.2±11.59ns
    100 non-equal items                                   1.00     17.4±0.40µs   1.66     28.8±1.02µs
    1000 equal items                                      1.12  1534.4±45.30ns   1.00  1363.9±41.31ns
    1000 non-equal items                                  1.08      2.0±0.08ms   1.00  1854.9±64.81µs
    1024 byte string, last 256 different                  1.00    101.2±3.13µs   1.43    144.6±4.20µs
    diff::chars on gitignore files from rust-lang/rust    1.00     65.9±2.54ms   1.04     68.7±2.67ms
    diff::lines on gitignore files from rust-lang/rust    1.00      4.9±0.18ms   1.20      5.9±0.15ms
    empty                                                 1.00     58.1±2.91ns   1.85    107.4±3.85ns
    utkarshkukreti committed Jun 29, 2022
    Configuration menu
    Copy the full SHA
    c6fef96 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8ebdaf2 View commit details
    Browse the repository at this point in the history
  4. update dependencies

    utkarshkukreti committed Jun 29, 2022
    Configuration menu
    Copy the full SHA
    9a3da7b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3ebd29d View commit details
    Browse the repository at this point in the history
  6. 0.1.13

    utkarshkukreti committed Jun 29, 2022
    Configuration menu
    Copy the full SHA
    0d0e68b View commit details
    Browse the repository at this point in the history
Loading