[Simh] Simh execution speed improvement - about 45% improvement.

Davis Johnson davis at frizzen.com
Tue Jan 22 07:30:55 EST 2008


Seth Morabito wrote:

> On 1/11/08, *Boucher, François* <boucher.francois at uqam.ca 
> <mailto:boucher.francois at uqam.ca>> wrote:
>
>     Hi!
>
>      
>
>     I would like to share with members of the simh community some
>     little improvements to obtain an executable code of simh that runs
>     faster.  My personnal results gave me an improvement of passing
>     from 17.2 VUPS to 25.0 VUPS on the same machine – about 45%
>     execution speed improvement.
>
>
> Impressive!  If I understand correctly, SIMH was never meant for 
> production use, but rather designed for historical accuracy and 
> preservation.  Nevertheless, many people in the community have found 
> that it fills a need, and have taken the effort to investigate how the 
> code can be adopted to daily production use.  Kudos to everyone 
> involved, especially Bob Supnik and the other core SIMH contributors 
> for making it all possible in the first place.
>
> -Seth
>
Impressive indeed... Impressive enough to get me to do a little 
semi-scientific experiment. Kudos to François for doing the runtime 
profiling. The results aren't supprising, but it is important to have 
solid solid data rather than guesses.

I normally play with the Interdata 32 bit emulator instead of the VAX. I 
also normally compile with no optimization specified because it makes 
debuggers easier to use. This was a big enough performance bump to get 
my attention, however.

I compiled id32 four different ways, to test two different variables. To 
check the effect of optimization I compiled with default (no?) 
optimization and with -O9. To check the effect of inlining I used my 
current development version of id32_cpu.c and a version edited to inline 
the memory access and relocation/protection functions. I used the GCC 
compiler Sun shipped with Solaris 10 11/06. I did not have a formal 
benchmark handy so I used a reasembly of the mag tape driver. Times 
reported are minutes:seconds based on time of day as reported by OS/32, 
which does well on overnight clock drift testing.

             |    Optimization       |
             | default  | -O9        |
not-inlined  |  1:13    |  0:28      |
inlined      |  1:12    |  0:28      |

I'd be inclined not to tinker with the source based on these results, 
but rather trust the compiler to do the right thing.

I would be interested to see the same four numbers for the VAX, results 
may be different.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20080122/c767b16d/attachment-0003.html>


More information about the Simh mailing list