Skip to content

Rework parser: eager cache, hinted scan, wstring_view#276

Open
kylereedmsft wants to merge 1 commit intomicrosoft:masterfrom
kylereedmsft:parser-rework
Open

Rework parser: eager cache, hinted scan, wstring_view#276
kylereedmsft wants to merge 1 commit intomicrosoft:masterfrom
kylereedmsft:parser-rework

Conversation

@kylereedmsft
Copy link
Copy Markdown
Member

  • Replace lazy deque cache with vector<property_info> fully populated on first access (ensure_cache_populated)
  • Add hinted linear scan for name->index resolution; sequential access is O(1) per call, callers can also provide explicit hints
  • Add parse/try_parse/view_of overloads accepting a ULONG hint parameter
  • Convert all property name parameters from const std::wstring& to std::wstring_view to avoid temporary allocations
  • Chain no-hint overloads to hint versions to eliminate code duplication

@kylereedmsft
Copy link
Copy Markdown
Member Author

We decided that for our normal use cases (sparse access), eager caching adds more overhead even though it's better for full record access. We're going with #275 instead which includes the hinting from this PR.

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