[svn:parrot] r48960 - branches/sleeker_boolean/examples/benchmarks
jkeenan at svn.parrot.org
jkeenan at svn.parrot.org
Sun Sep 12 15:51:24 UTC 2010
Author: jkeenan
Date: Sun Sep 12 15:51:24 2010
New Revision: 48960
URL: https://trac.parrot.org/parrot/changeset/48960
Log:
Set SVN properties on examples file.
Modified:
branches/sleeker_boolean/examples/benchmarks/boolean.pir (contents, props changed)
Modified: branches/sleeker_boolean/examples/benchmarks/boolean.pir
==============================================================================
--- branches/sleeker_boolean/examples/benchmarks/boolean.pir Sun Sep 12 15:48:12 2010 (r48959)
+++ branches/sleeker_boolean/examples/benchmarks/boolean.pir Sun Sep 12 15:51:24 2010 (r48960)
@@ -1,63 +1,63 @@
-# Copyright (C) 2010, Parrot Foundation.
-# $Id: boolean.pir 38923 2009-05-19 06:07:42Z Paul C. Anagnostopoulos $
-
-=head1 NAME
-
-examples/benchmarks/boolean.pir: Manipulate the Boolean PMC
-
-=head1 SYNOPSIS
-
-parrot examples/benchmarks/boolean.pir
-
-=head1 DESCRIPTION
-
-This benchmark operates on the Boolean PMC, allocating new ones, setting them,
-and performing logical operations on them.
-
-=cut
-
-.const num iterations = 10e6 # Number of iterations.
-
-.sub main :main
-
- .local num start_time, end_time
- .local int counter
- .local pmc a, b, c, result
-
- print "Perform "
- print iterations
- say " iterations of various Boolean operations"
-
- a = new 'Boolean', 1
- start_time = time
-
- counter = iterations
-LOOP:
- b = new 'Boolean'
- b = 1
- c = new 'Boolean', b
- result = not a
- result = and result, b
- result = or result, c
- not result
- if result goto TRUE
- a = 0
- goto NEXT
-TRUE:
- a = 1
-NEXT:
- dec counter
- if counter > 0 goto LOOP
-
- end_time = time
- end_time = end_time - start_time
- end_time = end_time / iterations
- print "Elapsed time per iteration: "
- say end_time
-.end
-
-# Local Variables:
-# mode: pir
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4 ft=pir:
+# Copyright (C) 2010, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+examples/benchmarks/boolean.pir: Manipulate the Boolean PMC
+
+=head1 SYNOPSIS
+
+parrot examples/benchmarks/boolean.pir
+
+=head1 DESCRIPTION
+
+This benchmark operates on the Boolean PMC, allocating new ones, setting them,
+and performing logical operations on them.
+
+=cut
+
+.const num iterations = 10e6 # Number of iterations.
+
+.sub main :main
+
+ .local num start_time, end_time
+ .local int counter
+ .local pmc a, b, c, result
+
+ print "Perform "
+ print iterations
+ say " iterations of various Boolean operations"
+
+ a = new 'Boolean', 1
+ start_time = time
+
+ counter = iterations
+LOOP:
+ b = new 'Boolean'
+ b = 1
+ c = new 'Boolean', b
+ result = not a
+ result = and result, b
+ result = or result, c
+ not result
+ if result goto TRUE
+ a = 0
+ goto NEXT
+TRUE:
+ a = 1
+NEXT:
+ dec counter
+ if counter > 0 goto LOOP
+
+ end_time = time
+ end_time = end_time - start_time
+ end_time = end_time / iterations
+ print "Elapsed time per iteration: "
+ say end_time
+.end
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
More information about the parrot-commits
mailing list