# Modeling the Power Consumption of Function-Level Code Relocation for Low-Power Embedded Systems
## 6 Experimental Results and Analysis
\begin{table}
\begin{tabular}{l l l l l l l l} \hline \hline \multirow{2}{*}{_Application_} & \multirow{2}{*}{_Function_} & \multicolumn{4}{c}{_Number of Instruction (N\({}_{g}\))_} & \multicolumn{4}{c}{_Percentage of the Instruction (r\({}_{N_{g}}\))_} \\ \cline{3-8}  & & **DP Group** & **RLS Group** & **BC Group** & **DP Group** & **RLS Group** & **BC Group** \\ \hline \multirow{2}{*}{Basicmath} & \multirow{2}{*}{solvecubic} & 55,396 & 23,426 & 17,743 & 0.20035 & 0.67980 & 0.21154 \\  & & usqrt & 221,100 & 11,034 & 66,133 & 0.79965 & 0.32020 & 0.78846 \\ \hline \multirow{2}{*}{Qsort} & \multirow{2}{*}{qsort} & 15,003 & 7807 & 10,986 & 0.13286 & 0.06840 & 0.27635 \\  & & compare & 74,870 & 57,464 & 16,780 & 0.66301 & 0.50340 & 0.42201 \\  & & swap & 23,051 & 48,872 & 11,988 & 0.20413 & 0.42820 & 0.30155 \\ \hline \multirow{2}{*}{Dijkstra} & \multirow{2}{*}{dijkstra} & 1,061,012 & 1,680,350 & 481,404 & 0.81304 & 0.80641 & 0.70985 \\  & & enqueue & 201,968 & 262,800 & 193,314 & 0.15477 & 0.12612 & 0.28505 \\  & & dequeue & 42,012 & 133,675 & 0 & 0.03219 & 0.06415 & 0.00000 \\  & & qcount & 0 & 6920 & 3458 & 0.00000 & 0.00332 & 0.00510 \\ \hline \multirow{2}{*}{Blowfish} & \multirow{2}{*}{init} & 32,438 & 15,912 & 6888 & 0.05442 & 0.03112 & 0.04253 \\  & & encrypt & 257,710 & 63,855 & 56,882 & 0.43237 & 0.12434 & 0.35123 \\  & & decrypt & 33,580 & 8284 & 7412 & 0.05634 & 0.01620 & 0.04577 \\  & & f & 272,316 & 423,584 & 90,768 & 0.45687 & 0.82834 & 0.56047 \\ \hline \multirow{2}{*}{SHA} & \multirow{2}{*}{stream} & 133,135 & 99,814 & 35,031 & 0.23667 & 0.21626 & 0.05320 \\  & & init & 10 & 7 & 12 & 0.00002 & 0.00002 & 0.00002 \\  & & update & 427,490 & 360,028 & 621,307 & 0.75993 & 0.78006 & 0.94353 \\  & & final & 20 & 25 & 21 & 0.00004 & 0.00005 & 0.00003 \\  & & transform & 1887 & 1666 & 2120 & 0.00035 & 0.00361 & 0.00322 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Benchmark information. \begin{table}
\begin{tabular}{l c c c} \hline \hline _Application_ & _Applicability of Code Migration_ & _Relocated Function_ & _Energy Consumed per Unit Second (mJ)_ \\ \hline \multirow{2}{*}{Basicmath} & \multirow{2}{*}{N} & - & 2.588 \\ \cline{3-4}  & & & solvecubic & 2.581 \\  & & usqrt & 2.467 \\ \hline \multirow{2}{*}{Qsort} & \multirow{2}{*}{N} & - & 3.401 \\ \cline{3-4}  & & qsort & 3.390 \\  & & compare & 3.306 \\  & & swap & 3.390 \\ \hline Dijkstra & \multirow{2}{*}{N} & - & 3.355 \\ \cline{3-4}  & & dijkstra & 2.957 \\  & & enqueue & 3.324 \\  & & dequeue & 3.343 \\  & & qcount & 3.348 \\ \hline \multirow{2}{*}{Blowfish} & \multirow{2}{*}{N} & - & 3.389 \\ \cline{3-4}  & & init & 3.362 \\ \cline{3-4}  & & encrypt & 3.364 \\ \cline{3-4}  & & decrypt & 3.364 \\ \hline SHA & \multirow{2}{*}{N} & - & 3.340 \\ \cline{3-4}  & & stream & 3.189 \\ \cline{3-4}  & & init & 3.338 \\ \cline{3-4}  & & update & 3.330 \\ \cline{3-4}  & & final & 3.333 \\ \cline{3-4}  & & transform & 3.308 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Energy consumed per unit second of benchmark functions. Figure 10 shows the correlation between the function placement efficiency PRE and the value of RS derived from the model. Based on the relative power consumption of the benchmark functions measured in the above experiment, the PRE was calculated and presented as a bar graph. Additionally, the RS value was calculated by applying the derived data listed in Table 5 to Equation (2) and presents the line in the subplots. The \(Slope(g)\), \(Intercept(g)\), and \(R(g)\) used here employed the result of the regression analysis in Figure 8. This is acceptable because the experiment was conducted to evaluate the proposed model in the same environment as the code profiling environment, which should be conducted in the pre-stage for regression analysis. The primary purpose of this work was to correctly predict the PRE order in a program. In this regard, the results showed that RS demonstrates a similar trend to PRE.