\label{doc_decisions_lookup_every_key_md_md_doc_decisions_lookup_every_key}%
\Hypertarget{doc_decisions_lookup_every_key_md_md_doc_decisions_lookup_every_key}%
 \hypertarget{doc_decisions_lookup_every_key_md_autotoc_md1939}{}\doxysection{Problem}\label{doc_decisions_lookup_every_key_md_autotoc_md1939}
On structures like maps or \mbox{\hyperlink{doc_decisions_array_md}{arrays}} there are different possibilities which keys are looked up in the Key\+Set and which are simply iterated.

Without any guidelines, applications would provide arbitrary inconsistent behavior.\hypertarget{doc_decisions_lookup_every_key_md_autotoc_md1940}{}\doxysection{Constraints}\label{doc_decisions_lookup_every_key_md_autotoc_md1940}
\hypertarget{doc_decisions_lookup_every_key_md_autotoc_md1941}{}\doxysection{Assumptions}\label{doc_decisions_lookup_every_key_md_autotoc_md1941}

\begin{DoxyItemize}
\item Applications that have good reasons to ignore the guidelines (e.\+g. they only read from one namespace), are allowed to do so.
\end{DoxyItemize}\hypertarget{doc_decisions_lookup_every_key_md_autotoc_md1942}{}\doxysection{Considered Alternatives}\label{doc_decisions_lookup_every_key_md_autotoc_md1942}

\begin{DoxyItemize}
\item only lookup the roots and then iterate over the next keys
\item let the applications do what they want without any guideline
\end{DoxyItemize}\hypertarget{doc_decisions_lookup_every_key_md_autotoc_md1943}{}\doxysection{Decision}\label{doc_decisions_lookup_every_key_md_autotoc_md1943}
Every key that an application wants to use, must be looked up with {\ttfamily ks\+Lookup} using a cascading lookup key.\hypertarget{doc_decisions_lookup_every_key_md_autotoc_md1944}{}\doxysection{Rationale}\label{doc_decisions_lookup_every_key_md_autotoc_md1944}

\begin{DoxyItemize}
\item very simple rule, easy to understand, easy to follow
\item provides consistent behavior ({\ttfamily spec} is always honored)
\item {\ttfamily ks\+Lookup} is quite cheap as it has only a few simple loops, only one allocation and less then 10\% of CPU time in profiling, even in very simple applications with many lookups.
\end{DoxyItemize}\hypertarget{doc_decisions_lookup_every_key_md_autotoc_md1945}{}\doxysection{Implications}\label{doc_decisions_lookup_every_key_md_autotoc_md1945}
Needs some helper functions or support in bindings as it is a bit tricky to implement e.\+g. for arrays.\hypertarget{doc_decisions_lookup_every_key_md_autotoc_md1946}{}\doxysection{Related Decisions}\label{doc_decisions_lookup_every_key_md_autotoc_md1946}

\begin{DoxyItemize}
\item \mbox{\hyperlink{doc_decisions_array_md}{Arrays}}
\end{DoxyItemize}\hypertarget{doc_decisions_lookup_every_key_md_autotoc_md1947}{}\doxysection{Notes}\label{doc_decisions_lookup_every_key_md_autotoc_md1947}
