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

Exp: Add RTree index for polygon #4

Merged
merged 8 commits into from
Jun 22, 2023
Merged

Conversation

ringsaturn
Copy link
Owner

@ringsaturn ringsaturn commented Jun 17, 2023

  • Please note that this PR is still WIP.
  • Memory usage increase a lot for tzf-ts use case(from 40MB to 140MB), which should be fixed.
  • For timezone query in tzf-rs's Finder use case, a benchmark runs on world cities on my MacBook Pro:
    • Previous version could run 70 Kops/s
    • This version could run 170 Kops/s
  • tzfpy perf diff:
    Name (time in us)               Min      Max    Mean  StdDev  Median     IQR  Outliers  OPS (Kops/s)  Rounds  Iterations
    ------------------------------------------------------------------------------------------------------------------------
    -test_tzfpy_random_cities     2.5024  26.9442  5.7295  2.7556  5.1883  3.3751  6551;618      174.5363   20000          10
    +test_tzfpy_random_cities     2.4133  14.5704  3.8425  0.9685  3.6863  1.2162  6779;364      260.2482   20000          10
    ------------------------------------------------------------------------------------------------------------------------
  • US AZ benchmark
    -test benches_az_polygon::poly_contain_point     ... bench:       2,704 ns/iter (+/- 18)
    -test benches_az_polygon::poly_not_contain_point ... bench:       2,715 ns/iter (+/- 5)
    +test benches_az_polygon::poly_contain_point     ... bench:         189 ns/iter (+/- 2)
    +test benches_az_polygon::poly_not_contain_point ... bench:          90 ns/iter (+/- 2)
  • Refer Speed up look up #3

TODO:

@ringsaturn ringsaturn force-pushed the ringsaturn/rtree-index branch 2 times, most recently from c936055 to 6da1902 Compare June 17, 2023 17:22
@ringsaturn ringsaturn changed the title Exp: add rtree index for polygon Exp: Add RTree index for polygon Jun 18, 2023
@ringsaturn

This comment was marked as resolved.

@ringsaturn ringsaturn marked this pull request as ready for review June 22, 2023 16:35
@ringsaturn ringsaturn merged commit c690361 into main Jun 22, 2023
1 check passed
@ringsaturn ringsaturn deleted the ringsaturn/rtree-index branch July 10, 2023 12:12
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