-
Notifications
You must be signed in to change notification settings - Fork 15
V0.5.11 #217
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
Open
mountainMath
wants to merge
13
commits into
main
Choose a base branch
from
v0.5.11
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
V0.5.11 #217
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Performance improvements: - Replace repeated rbind() in loops with list accumulation + bind_rows() - Cache full vector list once instead of repeated list_census_vectors() calls - Affects parent_census_vectors() and child_census_vectors() Changes: - Add testthat and microbenchmark to Suggests in DESCRIPTION - Optimize parent_census_vectors() and child_census_vectors() in R/census_vectors.R - Add comprehensive unit tests in tests/testthat/test-census_vectors.R - Add benchmark script in benchmarks/benchmark_rbind_loops.R Expected performance gains: 10-100x for deep hierarchies 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Created three benchmark scripts: - benchmark_rbind_loops.R: Basic benchmark comparing old vs new rbind approach - benchmark_realistic.R: Realistic hierarchy test (87K vectors, 8 levels) - benchmark_cache_improvement.R: Demonstrates the key optimization Key findings: - parent_census_vectors: 1.92x faster (cache optimization) - child_census_vectors: 1.23x faster (cache optimization) - Caching full vector list once eliminates repeated I/O and deserialization 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Performance improvements: - Replace nested lapply/sapply with pre-allocated vectors - Add early returns for edge cases (empty, single word, short text) - Use simple for loop with vectorized paste operations Changes: - Optimize n-gram generation in semantic_search() (R/vector_discovery.R) - Add 17 comprehensive unit tests (tests/testthat/test-semantic_search.R) - Add benchmark script (benchmarks/benchmark_semantic_search.R) Performance gains: 1.4x faster (30-40% speedup) - 100 vectors: 1.37x speedup - 500 vectors: 1.42x speedup - 1000 vectors: 1.43x speedup All tests passing (43 total) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- PERFORMANCE_SUMMARY.md: Comprehensive technical summary of all optimizations - NEWS.md: User-facing changelog for v0.5.8 with performance improvements - Documents 1.2-1.9x speedups in key functions - Details testing infrastructure (43 unit tests) - Provides benchmark reproduction instructions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Detailed performance improvement documentation - Backward compatibility guarantees - Trade-off analysis (memory vs speed) - Reverse dependency impact assessment - Testing and benchmarking details - Migration path (no action required for users) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Complete overview document covering: - Performance gains summary (1.2-1.9x speedups) - Testing and quality assurance (43 tests) - Trade-offs and risk analysis (LOW risk) - Impact on users and maintainers - Recommendations and next steps 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Merge branch 'main' into v0.5.11 # Conflicts: # DESCRIPTION # NEWS.md # README.md # cran-comments.md # docs/404.html # docs/LICENSE-text.html # docs/articles/Dwellings_by_document_type_cross_tabulation.html # docs/articles/Making_maps_with_cancensus.html # docs/articles/Taxfiler_Data.html # docs/articles/cancensus.html # docs/articles/data_discovery.html # docs/articles/index.html # docs/articles/intersecting_geometries.html # docs/articles/statcan_attribute_files.html # docs/articles/statcan_wds.html # docs/authors.html # docs/index.html # docs/news/index.html # docs/pkgdown.yml # docs/reference/CODES_TABLE.html # docs/reference/COV_SKYTRAIN_STATIONS.html # docs/reference/add_unique_names_to_region_list.html # docs/reference/as_census_region_list.html # docs/reference/census_vectors.html # docs/reference/child_census_vectors.html # docs/reference/dataset_attribution.html # docs/reference/explore_census_regions.html # docs/reference/explore_census_vectors.html # docs/reference/find_census_vectors.html # docs/reference/get_census.html # docs/reference/get_census_geometry.html # docs/reference/get_intersecting_geometries.html # docs/reference/get_recalled_database.html # docs/reference/get_statcan_geo_suite.html # docs/reference/get_statcan_geographic_attributes.html # docs/reference/get_statcan_geographies.html # docs/reference/get_statcan_geography_relationships.html # docs/reference/get_statcan_wds_data.html # docs/reference/get_statcan_wds_metadata.html # docs/reference/index.html # docs/reference/label_vectors.html # docs/reference/list_cancensus_cache.html # docs/reference/list_census_datasets.html # docs/reference/list_census_regions.html # docs/reference/list_census_vectors.html # docs/reference/list_recalled_cached_data.html # docs/reference/parent_census_vectors.html # docs/reference/remove_from_cancensus_cache.html # docs/reference/remove_recalled_cached_data.html # docs/reference/search_census_regions.html # docs/reference/search_census_vectors.html # docs/reference/set_cancensus_api_key.html # docs/reference/set_cancensus_cache_path.html # docs/reference/show_cancensus_api_key.html # docs/reference/show_cancensus_cache_path.html
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Incorporate changes from #216 and resolve merge conflicts with main and bump version number to schedule for next release