next up previous contents
Next: Future Work Up: Extending Sim286 to the Previous: Executing main and printf

   
Performance of Sim386

In this section, we report the results of some experiments that gather timings for Sim386, our simulator for the Intel 80386 processor. Sim386 can accept either COM or ELF binary input. Since both Sim286 and Sim386 accept COM files as input, we compare timings for these two simulators using a test suite of nine programs with COM binary input. We also report timings for Sim386 using ELF binary input. All experiments with the test programs were conducted on a Gateway 2000 with a 200 MHz Pentium Pro processor running the Linux Red Hat 5.0 operating system. The programs were executed ten times and the execution times reported in this chapter are averages over these ten executions.

To create COM binary executables for both Sim286 and Sim386, we use the Borland 4.5 C compiler to produce 8086 assembly code. The 8086 assembly code is assembled using Wolfware Assembler, or WASM[9], to create an executable COM file. To create ELF binary executables for Sim386, we use the gcc C compiler version 2.7.2.3 with O2 optimizations.

The test programs listed in column one of the table in Figure 4.1 include a program to compute Fibonacci numbers, fibbk; a program that uses Gaussian elimination without pivoting, gauss[10]; an insertion sort, isort; the first Livermore loop, livermore[5]; matrix multiplication, matmult[10]; a program to transform a matrix into Hermite normal form, normal[10]; the sieve of Erosthothenes, sieve; a program that uses tiling to optimize data cache references, tiling[2]; and a program to perform matrix transposition, transpose.


  
Figure: Performance Results: Timings for the Sim286 and Sim386 simulators on a Test Suite of 9 programs.
\begin{figure}
\par {\footnotesize
\centerline{\protect
\begin{tabular}{\vert l\...
...& 645.49\\
\hline
\end{tabular}}
\protect
\rule{6.5in}{0.3mm}\\
}
\end{figure}

Our experiments indicate that for COM file input, Sim286 is, on average, 2.06 percent faster than Sim386 when using the test suite of nine programs. Additional logic is included in Sim386 to check for operand size during processing. Sim386 now includes an additional check for 32-bit operands; this check is not a part of Sim286.

The table in Figure 4.1 also indicates that six of the nine programs slow down for ELF binary input and the three others are faster. For example, gauss, matmult, normal, sieve, tiling and transpose slow down when ELF binary input is used. Of these six programs. sieve uses a one-dimensional array and the other five programs use two-dimensional arrays. When performing array computations the SIB byte is used heavily by the gcc compiler. Sim386, in determining the additional addressing modes provided by the SIB byte, requires more time when simulated in software but is more efficient when executed in hardware. Thus, for the test suite, those programs that make heavy use of array computations are slower when they accept ELF binary input.


next up previous contents
Next: Future Work Up: Extending Sim286 to the Previous: Executing main and printf
Michael L. Haungs
1998-09-21