head	1.1;
access
	thoth;
symbols
	r1_1_beta:1.1
	r1_1_alpha:1.1
	r1_0:1.1
	r0_11:1.1
	r0_10:1.1
	r0_9:1.1
	Eglin_alpha_1:1.1;
locks; strict;
comment	@// @;


1.1
date	92.08.20.22.27.56;	author rjj;	state Exp;
branches;
next	;


desc
@Initial creation from timing-test.cc
@



1.1
log
@Initial revision
@
text
@// Emacs: -*- C++ -*-

static char rcsid[] = "$Id: timing-test.C,v 1.1 92/07/30 00:13:30 fischer Exp $";

//
// $Log:	timing-test.C,v $

// 
// 
// Stupid timing test.  With default compilation ( -g (a.k.a. -max_code_size) and
// no -O (i.e., -do_what_programmer_would_do) I get the following times before
// my own loop unrolling:
//
//  % time ./timing-test averaged over ten cases
//  8.82u 0.34s 0:10.522 88.13% 0+83k 0.2+0.0 io  0.0 pf+0 w    before loop unrolling
//  7.73u 0.27s 0:09.019 89.62% 0+83k 0.3+1.3 io  0.8 pf+0 w    after loop unrolling
//
// more recent timings will show a better improvement in the optimized
// code, about 6% on raybans.cis.ufl.edu.  I expect the unoptimized version
// to show better than the above speedup, since the ``min'' and ``max'' 
// functions had the same kind of optimization applied.

#include <IntPoint.h>
#include <FloatPoint.h>

int main(int argc, char**argv)
{
    IntPoint	ip(0, 1, -2, -1), iq(3, 2, 1, 0);
    
    IA::exit_on_throw = 0;
    

    for (int i = 0; i < 100000; i++) {
	ip = min (ip, iq);
    }

}
@
