Skip to content

feat: support private property definitions - #1049

Open
cdc-as81 wants to merge 1 commit into
mainfrom
cdc-as81-1032-support-private-properties
Open

feat: support private property definitions#1049
cdc-as81 wants to merge 1 commit into
mainfrom
cdc-as81-1032-support-private-properties

Conversation

@cdc-as81

Copy link
Copy Markdown
Collaborator

Summary

  • Add private = true support to define_property! and
    define_derived_property!.
  • Apply private visibility consistently across tuple structs, named-field
    structs, optional-value structs, and enums.
  • Preserve public visibility as the default, including fields on public derived
    properties.
  • Add targeted diagnostics for private = false and incorrectly ordered
    private options.
  • Document the new option and add privacy, compatibility, and diagnostic tests.

implements #1032

@github-actions

Copy link
Copy Markdown

Benchmark Results

Hyperfine

Command Mean [ms] Min [ms] Max [ms] Relative
large_sir::baseline 2.0 ± 0.1 1.9 2.2 1.00
large_sir::baseline_households 2.0 ± 0.0 2.0 2.1 1.01 ± 0.03
large_sir::entities 3.7 ± 0.1 3.6 3.9 1.84 ± 0.06
large_sir::households 3.7 ± 0.2 3.5 4.0 1.86 ± 0.10

Criterion

Regressions (slower)
Group Bench Param Change CI Lower CI Upper
sampling sampling_single_known_length_entities 33.302% 30.441% 36.320%
sampling count_and_sampling_single_known_length_entities 22.737% 21.090% 23.940%
counts multi_property_unindexed_entities 13.790% 11.105% 16.527%
counts multi_property_indexed_entities 6.721% 5.591% 8.027%
sample_entity sample_entity_single_property_indexed 1000 2.426% 2.007% 2.815%
sampling sampling_multiple_unindexed_entities 1.934% 1.568% 2.283%
Improvements (faster)
Group Bench Param Change CI Lower CI Upper
sample_entity sample_entity_whole_population 1000 -9.814% -11.190% -8.365%
indexing query_people_single_indexed_property_entities -9.510% -9.670% -9.342%
sample_entity sample_entity_whole_population 100000 -9.005% -10.582% -7.379%
sample_entity sample_entity_whole_population 10000 -7.699% -8.888% -6.515%
counts reindex_after_adding_more_entities -6.431% -6.702% -6.166%
counts concrete_plus_derived_unindexed_entities -6.207% -8.164% -4.430%
examples example-births-deaths -3.130% -3.302% -2.973%
examples example-basic-infection -3.062% -3.675% -2.403%
indexing query_people_multiple_individually_indexed_properties_entities -2.923% -3.154% -2.697%
indexing query_people_count_single_indexed_property_entities -2.355% -3.129% -1.614%
sample_entity sample_entity_single_property_indexed 100000 -2.309% -3.042% -1.529%
indexing query_people_count_multiple_individually_indexed_properties_enti -2.068% -2.214% -1.909%
sample_entity sample_entity_single_property_indexed 10000 -1.601% -2.163% -1.068%
Unchanged / inconclusive (CI crosses 0%)
Group Bench Param Change CI Lower CI Upper
large_dataset bench_query_population_multi_unindexed_entities 1.911% 0.374% 3.433%
large_dataset bench_filter_unindexed_entity 1.725% -1.817% 5.125%
sampling sampling_single_unindexed_concrete_plus_derived_entities -1.041% -1.249% -0.821%
indexing with_query_results_multiple_individually_indexed_properties_enti -0.908% -1.436% -0.509%
sample_entity sample_entity_single_property_unindexed 1000 -0.748% -1.438% -0.137%
sample_entity sample_entity_single_property_unindexed 100000 0.743% 0.344% 1.140%
sample_entity sample_entity_single_property_unindexed 10000 -0.720% -0.931% -0.541%
large_dataset bench_query_population_property_entities -0.696% -1.357% -0.010%
sample_entity sample_entity_multi_property_indexed 10000 -0.673% -1.149% -0.318%
large_dataset bench_query_population_multi_indexed_entities -0.559% -1.143% -0.142%
indexing query_people_indexed_multi-property_entities -0.523% -0.709% -0.348%
large_dataset bench_filter_indexed_entity -0.505% -2.246% 1.037%
counts index_after_adding_entities 0.445% -0.082% 1.009%
sampling sampling_single_l_reservoir_entities -0.443% -1.450% 0.315%
large_dataset bench_query_population_derived_property_entities -0.423% -0.723% -0.118%
sampling sampling_multiple_l_reservoir_entities -0.390% -0.726% -0.069%
indexing query_people_count_indexed_multi-property_entities -0.368% -1.078% 0.316%
sampling count_and_sampling_single_unindexed_concrete_plus_derived_entiti -0.353% -0.517% -0.185%
sample_entity sample_entity_multi_property_indexed 1000 0.348% 0.129% 0.630%
algorithm_benches algorithm_sampling_multiple_known_length 0.280% -0.103% 0.644%
algorithm_benches algorithm_sampling_multiple_l_reservoir -0.275% -0.603% 0.033%
sampling sampling_single_unindexed_entities 0.214% -0.072% 0.496%
large_dataset bench_query_population_indexed_property_entities 0.190% -0.096% 0.518%
sampling sampling_multiple_known_length_entities 0.188% -0.090% 0.490%
algorithm_benches algorithm_sampling_single_rand_reservoir -0.172% -0.435% 0.018%
counts single_property_indexed_entities -0.168% -0.609% 0.313%
indexing with_query_results_single_indexed_property_entities -0.157% -0.886% 0.645%
large_dataset bench_match_entity -0.146% -0.533% 0.194%
sample_entity sample_entity_multi_property_indexed 100000 0.140% -0.363% 0.700%
algorithm_benches algorithm_sampling_single_l_reservoir -0.134% -0.287% 0.002%
counts single_property_unindexed_entities -0.099% -0.595% 0.423%
algorithm_benches algorithm_sampling_single_known_length -0.095% -0.279% 0.072%
indexing with_query_results_indexed_multi-property_entities 0.091% -0.084% 0.260%
Not Compared (no baseline yet)
Group Bench Reason
(none)

github-actions Bot added a commit that referenced this pull request Aug 25, 2026
@cdc-as81 cdc-as81 linked an issue Aug 25, 2026 that may be closed by this pull request
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.

Support private properties

2 participants