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 cached envelope benchmark #137

Merged
merged 3 commits into from
Oct 8, 2023
Merged

Add cached envelope benchmark #137

merged 3 commits into from
Oct 8, 2023

Conversation

urschrei
Copy link
Member

@urschrei urschrei commented Oct 8, 2023

  • I agree to follow the project's code of conduct.
  • I added an entry to rstar/CHANGELOG.md if knowledge of this change could be valuable to users.

@adamreichold
Copy link
Member

Not really part of the change but since we are touching this file:

  • circular_polygon is pub but I don't think it needs to be.
  • create_random_polygons could return impl Iterator<Item=Polygon<f64>> to avoid unnecessary intermediate collections.

@urschrei
Copy link
Member Author

urschrei commented Oct 8, 2023

@adamreichold like this?

@adamreichold
Copy link
Member

@adamreichold like this?

Almost. The new bulk_load_complex_geom_cached benchmark still collects and then maps instead immediately doing something like

let cached: Vec<_> =
    create_random_polygons(DEFAULT_BENCHMARK_TREE_SIZE, 4096, SEED_1)
        .map(CachedEnvelope::new)
        .collect();

@urschrei urschrei merged commit 9f8c6b6 into master Oct 8, 2023
@urschrei urschrei deleted the cached_envelope_bench branch October 8, 2023 14:28
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.

2 participants