Actions

Difference between revisions of "Benchmarks-watcom"

From Gambit wiki

(Undo revision 382 by WikiSysop (Talk))
 
Line 1: Line 1:
<texinfo aa=11 bb=22>
+
Comparison of Watcom to mingw-prebuilt for Gambit-v4.1.2.  Note that the benchmarks supplied with the distribution were not intended to be run standalone so I have bypassed the prefixes. Clearly, GCC is significantly faster than Watcom.
@deffn procedure fixnum-overflow-exception? @var{obj}
+
<pre>
@deffnx procedure fixnum-overflow-exception-procedure @var{exc}
+
gsi puzzle.scm  ; watcom
@deffnx procedure fixnum-overflow-exception-arguments @var{exc}
+
(time (start))
 
+
     4567 ms real time
Fixnum-overflow-exception objects are raised by some of the fixnum
+
     4567 ms cpu time (4567 user, 0 system)
specific procedures when the result is larger than can fit in a
+
    61 collections accounting for 230 ms real time (230 user, 0 system)
fixnum. The parameter @var{exc} must be a fixnum-overflow-exception
+
    30940760 bytes allocated
object.
+
    no minor faults
 
+
    no major faults
The procedure @code{fixnum-overflow-exception?} returns
 
@code{#t} when @var{obj} is a fixnum-overflow-exception
 
object and @code{#f} otherwise.
 
 
 
The procedure @code{fixnum-overflow-exception-procedure}
 
returns the procedure that raised @var{exc}.
 
 
 
The procedure @code{fixnum-overflow-exception-arguments}
 
returns the list of arguments of the procedure that raised @var{exc}.
 
 
 
For example:
 
 
 
@smallexample
 
> @b{(define (handler exc)                                                    
 
    (if (fixnum-overflow-exception? exc)                                      
 
        (list (fixnum-overflow-exception-procedure exc)                       
 
              (fixnum-overflow-exception-arguments exc))                       
 
        'not-fixnum-overflow-exception))}
 
> @b{(with-exception-catcher                                                   
 
     handler                                                                   
 
     (lambda () (fx* 100000 100000)))}
 
(#<procedure #2 fx*> (100000 100000))
 
@end smallexample
 
 
 
@end deffn
 
 
 
@deffn {special form} time @r{@i{expr}}
 
 
 
The @code{time} special form evaluates @i{expr} and returns the
 
result.  As a side effect it displays a message on the interaction
 
channel which indicates how long the evaluation took (in real time and
 
cpu time), how much time was spent in the garbage collector, how much
 
memory was allocated during the evaluation and how many minor and
 
major page faults occured (0 is reported if not running under UNIX).
 
 
 
For example:
 
  
@frog
+
Microsoft Windows XP [Version 5.1.2600]
 +
(C) Copyright 1985-2001 Microsoft Corp.
  
@smallexample
+
C:\gt>gsi puzzle ; (mingw)
> @b{(define (f x)                                                             
+
(time (start))
    (let loop ((x x) (lst '()))
+
     2995 ms real time
      (if (= x 0)
+
     2994 ms cpu time (2994 user, 0 system)
          lst
+
     61 collections accounting for 220 ms real time (220 user, 0 system)
          (loop (- x 1) (cons x lst)))))}
+
     30940760 bytes allocated
> @b{(length (time (f 100000)))}
 
(time (f 100000))
 
     683 ms real time
 
     558 ms cpu time (535 user, 23 system)
 
     8 collections accounting for 102 ms real time (70 user, 5 system)
 
     6400160 bytes allocated
 
 
     no minor faults
 
     no minor faults
 
     no major faults
 
     no major faults
100000
 
@end smallexample
 
  
@end deffn
+
C:\gt>gsi graphs ;mingw
 +
(time (run 5))
 +
    1161 ms real time
 +
    1162 ms cpu time (1162 user, 0 system)
 +
    98 collections accounting for 380 ms real time (381 user, 0 system)
 +
    41479048 bytes allocated
  
</texinfo>
+
C:\gt>gsi graphs.scm ;watcom
 +
(time (run 5))
 +
    1593 ms real time
 +
    1592 ms cpu time (1592 user, 0 system)
 +
    98 collections accounting for 541 ms real time (541 user, 0 system)
 +
    41479896 bytes allocated
 +
</pre>

Latest revision as of 17:56, 1 December 2008

Comparison of Watcom to mingw-prebuilt for Gambit-v4.1.2. Note that the benchmarks supplied with the distribution were not intended to be run standalone so I have bypassed the prefixes. Clearly, GCC is significantly faster than Watcom.

gsi puzzle.scm  ; watcom
(time (start))
    4567 ms real time
    4567 ms cpu time (4567 user, 0 system)
    61 collections accounting for 230 ms real time (230 user, 0 system)
    30940760 bytes allocated
    no minor faults
    no major faults

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\gt>gsi puzzle ; (mingw)
(time (start))
    2995 ms real time
    2994 ms cpu time (2994 user, 0 system)
    61 collections accounting for 220 ms real time (220 user, 0 system)
    30940760 bytes allocated
    no minor faults
    no major faults

C:\gt>gsi graphs ;mingw
(time (run 5))
    1161 ms real time
    1162 ms cpu time (1162 user, 0 system)
    98 collections accounting for 380 ms real time (381 user, 0 system)
    41479048 bytes allocated

C:\gt>gsi graphs.scm ;watcom
(time (run 5))
    1593 ms real time
    1592 ms cpu time (1592 user, 0 system)
    98 collections accounting for 541 ms real time (541 user, 0 system)
    41479896 bytes allocated