## 5 Feasibility Analyses and Simulation Results  
To justify the feasibility and applicability of our optimized labeled-PSI protocol, we have conducted a series of experiments associated with different polynomial degrees, the Client's dataset size, and the Server's dataset size. Our experimental settings are as follows:  
* Hardware Setup: Asus X550 JX 8-core CPU (i7-4720 HQ) (CPU clock frequency is fixed at 3.6 GHz)
* Memory: 8 GB
* Operating System: Ubuntu 18.04.5 LTS
* Homomorphic Encryption Framework: SEAL (BFV Scheme)  
Figure 2: Sequence Diagram of the Enhanced Labeled Private Set Intersection protocol from a high-level perspective. * Multi-threading Framework: OpenMP  
Tables 8 and 9, respectively, report our protocol's Single-thread and Multi-thread runtime timing performances associated with testing parameters that are practical for regular-sized hospitals in Taiwan. In Table 8, it is observed that when the size of the Server's dataset is fixed, the size of the Client's dataset has little effect on the protocol's execution time. This preferable property came from our insertion of a hash table into the Client's dataset during optimization and did operations in batching mode. Although the Client's dataset size is only 100, 1000, or 10,000, those remaining empty slots in the Hash Table will still be used by the Server as the Server is unaware of which slot is empty. In addition, since the HE scheme cannot support branching, there is no similar program logic in our protocol, such as _if (empty slot), then skip_. Table 9 shows a similar experimental result to Table 8 under the multi-thread execution mode. There are 8 CPU cores in our testing machine, which means up to 8 times acceleration can be expected in an ideal case. However, only some of the entire program can be parallelly executed as there are dependencies and costs for thread creation, lock acquisition, and aggregation. Nevertheless, we can still see that the overall performance improved after involving multi-threading. To further prove the feasibility of our protocol, we enlarge the Server's dataset size to \(2^{24}\), which is the limitation of our testing hardware settings. We demonstrate the runtime timing performance in Table 10.  
In the above tables, Client data size = 100 means sending 100 data to the server. The polynomial degree decides the maximum number of client data sent to the server. For \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Polynomial Degree** & **Client Data Size** & **Server Data Size** & **Runtime Results (Seconds)** \\ \hline
16,384 & 100 & \(2^{21}\) & 90.51 \\
16,384 & 100 & \(2^{22}\) & 107.52 \\
16,384 & 100 & \(2^{23}\) & 127.66 \\
16,384 & 100 & \(2^{24}\) & 139.77 \\ \hline \hline \end{tabular}
\end{table} 
Table 10: The execution time associated with various testing parameters under the Multi-thread computation mode and large Server dataset. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Polynomial Degree** & **Client Data Size** & **Server Data Size** & **Runtime Results (Seconds)** \\ \hline
16,384 & 100 & \(2^{16}\) & 8.12 \\
16,384 & 1000 & \(2^{16}\) & 8.48 \\
16,384 & 10,000 & \(2^{16}\) & 8.50 \\
16,384 & 100 & \(2^{20}\) & 47.79 \\
16,384 & 1000 & \(2^{20}\) & 47.92 \\
16,384 & 10,000 & \(2^{20}\) & 47.93 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: The execution time associated with various testing parameters under the Single-thread computation mode. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Polynomial Degree** & **Client Data Size** & **Server Data Size** & **Runtime Results (Seconds)** \\ \hline
16,384 & 100 & \(2^{16}\) & 3.41 \\
16,384 & 1000 & \(2^{16}\) & 3.38 \\
16,384 & 1000 & \(2^{16}\) & 3.39 \\
16,384 & 100 & \(2^{20}\) & 16.62 \\
16,384 & 1000 & \(2^{20}\) & 16.55 \\
16,384 & 10,000 & \(2^{20}\) & 16.67 \\ \hline \hline \end{tabular}
\end{table} 
Table 9: The execution time associated with various testing parameters under the multi-thread computation mode. example, polynomial degree = 16,384 means the number of client data that can be sent to the server < 16,384.