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

Skip intermediate coord representation #49

Merged
merged 1 commit into from
May 11, 2024
Merged

Commits on May 11, 2024

  1. Skip intermediate coord representation

    We can just build up the coords directly rather than building up arrays
    and then converting them to Coords.
    
    ```
    $ cargo bench --bench="*" --  --baseline=sha-6872788
       Compiling polyline v0.10.2 (/Users/mkirk/src/georust/polyline)
        Finished `bench` profile [optimized] target(s) in 0.94s
         Running benches/benchmarks.rs
    (target/release/deps/benchmarks-8b91c88197106af3)
    encode 10_000 coordinates at precision 1e-5
                            time:   [180.56 µs 180.85 µs 181.16 µs]
                            change: [-1.3886% -1.0790% -0.7773%] (p = 0.00 < 0.05)
                            Change within noise threshold.
    Found 5 outliers among 100 measurements (5.00%)
      2 (2.00%) low mild
      3 (3.00%) high mild
    
    encode 10_000 coordinates at precision 1e-6
                            time:   [219.72 µs 220.82 µs 221.84 µs]
                            change: [+0.5301% +1.0508% +1.5979%] (p = 0.00 < 0.05)
                            Change within noise threshold.
    
    decode 10_000 coordinates at precision 1e-5
                            time:   [80.937 µs 81.828 µs 82.713 µs]
                            change: [-4.9284% -3.9764% -2.9753%] (p = 0.00 < 0.05)
                            Performance has improved.
    
    decode 10_000 coordinates at precision 1e-6
                            time:   [97.706 µs 98.786 µs 99.825 µs]
                            change: [-3.1947% -2.2649% -1.3617%] (p = 0.00 < 0.05)
                            Performance has improved.
    ```
    michaelkirk committed May 11, 2024
    Configuration menu
    Copy the full SHA
    9559db9 View commit details
    Browse the repository at this point in the history