Skip to content

Commit 7704ff3

Browse files
committed
refactor: Address PR feedback for vocabulary bitset optimization
This commit addresses all maintainer feedback on PR #2040: API improvements: - Use initializer_list constructor instead of chained insert() calls - Use brace initialization {} for construction - Change insert() signature: insert(uri, required) instead of pair - Add enum-based overloads (contains/insert/get with Known enum) - Rename method from find() to get() for clarity Implementation improvements: - Rename jsonschema_vocabularies.cc to vocabularies.cc - Reorder vocabulary checks from newest to oldest (2020-12 first) - Rename short variable names (it -> iterator) - Move inline comments above their respective lines - Remove merge() method and update all usages Test updates: - Replace all merge() calls with combined vocabulary constants - Add VOCABULARIES_2019_09_APPLICATOR_AND_VALIDATION - Add VOCABULARIES_2020_12_APPLICATOR_AND_VALIDATION - Add VOCABULARIES_2020_12_UNEVALUATED_AND_APPLICATOR - Add VOCABULARIES_2020_12_APPLICATOR_UNEVALUATED_AND_VALIDATION - Update test macros to use get() instead of at() - Update walker_test to use get() instead of find() Documentation: - Add TODO comment documenting future optimization opportunities - Note priority areas: alterschema rules, bundle.cc, frame.cc, official_walker.cc - Document potential for orders of magnitude performance improvement Cleanup: - Remove benchmark files per maintainer request All changes maintain backward compatibility while providing optimized enum-based API for known vocabularies.
1 parent 167c44b commit 7704ff3

21 files changed

+359
-1015
lines changed

benchmark_vocabulary.cc

Lines changed: 0 additions & 289 deletions
This file was deleted.

0 commit comments

Comments
 (0)