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

Add some function inlining #38

Merged
merged 1 commit into from
Nov 27, 2024
Merged

Add some function inlining #38

merged 1 commit into from
Nov 27, 2024

Conversation

kylebarron
Copy link
Member

@kylebarron kylebarron commented Nov 27, 2024

  • I agree to follow the project's code of conduct.
  • I added an entry to CHANGES.md if knowledge of this change could be valuable to users.
  • I ran cargo fmt

It turns out function inlining can have a surprisingly big effect on the benchmark:

Benchmarking parse small to geo: Collecting 100 samples in estimated 5.0001 s (42M itera
parse small to geo      time:   [125.30 ns 125.89 ns 126.34 ns]
                        change: [-12.615% -11.585% -10.646%] (p = 0.00 < 0.05)
                        Performance has improved.

Benchmarking parse big to geo: Collecting 100 samples in estimated 5.2794 s (40k iterati
parse big to geo        time:   [130.44 µs 131.96 µs 133.69 µs]
                        change: [-16.388% -15.530% -14.647%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 18 outliers among 100 measurements (18.00%)
  16 (16.00%) low mild
  2 (2.00%) high severe

That brings the parse to 2.8x faster than shapely.wkb.loads (see #37)

@kylebarron kylebarron merged commit 2a9c28e into main Nov 27, 2024
1 check passed
@kylebarron kylebarron deleted the kyle/function-inline branch November 27, 2024 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant