<div dir="ltr"><div><div><div>Hi all,<br><br></div>I did some experiments compiling SIMH with compiler profiling and found some significant improvements.  My testing was with the vax8600 simulator running Ultrix 2.0, though similar improvements should be seen with any VAX simulator and any OS.  I used nbench ( <a href="http://www.tux.org/~mayer/linux/bmark.html">http://www.tux.org/~mayer/linux/bmark.html</a> ) to provide a mix of memory and CPU testing.<br><br></div><div>For these tests I used gcc 5.2.0 and icc 15.0.3 on a Core 2 Q9500 running Linux 4.2.5, and the latest version of SIMH from git.  In all tests I simply booted the VAX to multi-user, ran nbench, and then shut down.  With gcc, profiling was collected by compiling with -fprofile-generate, running the benchmark, and then recompiling with -fprofile-use.  icc was similar, using -prof_gen and -prof_use.  The procedure should be the same for any reasonably modern version of gcc or icc.  I didn't test clang, but informal testing in the past showed that it did not produce code that was as fast as either of the other two compilers.<br><br></div><div>Results, higher numbers are better:<br><br></div><div>gcc -O3 -march=native<br></div><div>mem 0.112<br></div><div>integer 0.069<br>floating 0.128<br><br></div><div>gcc -O3 -march=native profiled<br>mem 0.202<br>integer 0.113<br>floating 0.199<br><br></div><div>icc -O3 -xHOST -ipo -no-prec-div -fp-model fast=2<br></div><div>mem 0.147<br></div><div>integer 0.087<br>floating 0.156<br><br></div><div>icc -O3 -xHOST -ipo -no-prec-div -fp-model fast=2 profiled<br>mem 0.194<br>int 0.109<br>floating 0.198<br><br></div><div>and for comparison, a real VAX 4000/90 running NetBSD that I benchmarked many years ago:<br></div><div>mem 0.136<br></div><div>integer 0.132<br></div><div>floating 0.157<br></div><div><br></div><div>As you can see, the performance improvements are fairly dramatic, with gcc improving an average of 66%.  Of course, one benchmark is not necessarily indicative of a real life workload; the most appropriate improvements would probably be made by profiling using whatever workload your system generally runs.  This was merely meant to illustrate what sort of gains are possible.<br><br></div><div>I find it fascinating that a Q9500 can be almost as fast, or faster, than a real NVAX workstation.  I imagine that the most modern Intel processor would probably be faster than any real VAX.<br></div><div><br></div>I also did some quick testing with the pdp11 simulator and found significant improvements.  I imagine that profiling gains would probably be seen with any of the simulators.<br><br></div>-Henry<br></div>