Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!mcsun!hp4nl!ruuinf!ruunsa!chooft From: chooft@ruunsa.fys.ruu.nl (Rob Hooft) Newsgroups: comp.sys.sgi Subject: Benchmarking the SGI: Floating point faster than integer? Keywords: Benchmark floating integer sgi fortran FLOPS Message-ID: <1464@ruunsa.fys.ruu.nl> Date: 11 Sep 90 14:38:27 GMT Organization: University of Utrecht, Dept. of Physics Lines: 50 Hello, As I am planning to buy a PC, I am benchmarking all computers available to me. On our PI this resulted in a 'pleasant' surprise: Floating point multiplications are about twice as fast as integer multiplications. Is there anybody that can explain the results of the following session to me? Rob Hooft, Chemistry department University of Utrecht, The Netherlands -----CUT HERE--------------------------------------------------------------- cia:[101]:hooft>cat test.f program test integer i real a,f,g integer ia,if,ig f=28.0 g=36.0 if=28 ig=36 t=cputime(0.0) do 100 i=1,3000000 100 ia=if*ig write(*,*) cputime(t) t=cputime(0.0) do 200 i=1,3000000 200 a=f*g write(*,*) cputime(t) t=cputime(0.0) do 300 i=1,3000000 300 continue write(*,*) cputime(t) end function cputime(f) real g(2) call etime(g) cputime=g(1)+g(2)-f return end cia:[102]:hooft>f77 -O0 -o test test.f cia:[103]:hooft>test 6.340000 4.200000 2.070000 12.5u 0.1s 0:15 82% cia:[104]:hooft>^D -----CUT HERE--------------------------------------------------------------- -- ------------------------------------------------------------------------ This is my brand new signature ========================================= ------------------------------------------------------------------------