### Version v2.0.250303.1 ### Summary I created a synthetic benchmark to test the perf of the failed case of Lookup(), that generates a C++ exception (impl below hresult_out_of_bounds()), and it reports the following when compared to the OS implementation of ValueSet. Lookup is called in TryLookup to simplify usage. ``` CppWinRT Map TryLookup fails 100000 iterations, 2021ms, 0ms per iteration TryLookup succeeds 100000 iterations, 5ms, 0ms per iteration ValueSet TryLookup fails 100000 iterations, 2ms, 0ms per iteration TryLookup succeeds 100000 iterations, 3ms, 0ms per iteration ``` **2021ms vs 2ms** Antonio is working on fixing this in [this PR](https://github.com/microsoft/cppwinrt/pull/1512). ```cpp ... struct map_view_base : iterable_base<D, Windows::Foundation::Collections::IKeyValuePair<K, V>, Version> { V Lookup(K const& key) const { ... if (pair == static_cast<D const&>(*this).get_container().end()) { throw hresult_out_of_bounds(); } ``` ### Reproducible example ```cpp ``` ### Expected behavior _No response_ ### Actual behavior _No response_ ### Additional comments _No response_