Make use of GetMany to improve perf of CopyTo - #2517
Open
Manodasan Wignarajah (manodasanW) wants to merge 9 commits into
Open
Make use of GetMany to improve perf of CopyTo#2517Manodasan Wignarajah (manodasanW) wants to merge 9 commits into
Manodasan Wignarajah (manodasanW) wants to merge 9 commits into
Conversation
Copy IList<string> values through a single IVector.GetMany ABI call with balanced HSTRING cleanup, falling back only when a provider returns fewer items. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ddbd67fd-01c2-4b1b-b23f-f9eb0ad8f70e
Batch ICollection<T>.CopyTo through IVector<T>.GetMany across blittable, string, object, reference, value, nullable, key-value pair, Type, and Exception element categories. Add focused native-vector tests and string benchmark coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Validate native counts, preserve E_NOTIMPL fallback compatibility, correct GetMany vtable signatures, and add chunk-boundary string coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
No known conforming IVector implementation returns E_NOTIMPL from GetMany, so preserve normal failure propagation rather than masking incomplete providers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove defensive count clamping because it cannot validate or repair a malformed native provider and conforming implementations must return at most the requested capacity. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Use span copies for managed arrays and List<T> exposed through IVector<T>, while retaining the indexer fallback for arbitrary IList<T> implementations. Add coverage for offsets, limited capacity, empty requests, and each implementation path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the TestWinRT-dependent benchmark call commented until the corresponding native benchmark API is available. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
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.
Measured
IList<T>.CopyToover 100,000-element nativeIVector<T>instances using theCollectionsPerf.GetMany*benchmarks.intstringMeasured a native component calling
IVector<int>.GetManyon a managedint[]containing 100,000 elements.IList<T>indexer loopThe optimized path is approximately 5.6× faster, reducing per-item cost by ~82%, with no managed allocations reported.