Author: Remi Meier <[email protected]>
Branch: c8-private-pages
Changeset: r1564:205085ecca8f
Date: 2015-01-21 15:43 +0100
http://bitbucket.org/pypy/stmgc/changeset/205085ecca8f/

Log:    some changes to the duhton demos

diff --git a/duhton-c8/demo/many_square_roots.duh 
b/duhton-c8/demo/many_square_roots.duh
--- a/duhton-c8/demo/many_square_roots.duh
+++ b/duhton-c8/demo/many_square_roots.duh
@@ -8,10 +8,11 @@
 
 (defun show-square-root (n)
   (setq s (square-root n))
-  (print (quote square-root-of) n (quote is) s))
+  (print (quote square-root-of) n (quote is) s)
+  )
 
 
 (setq n 0)
-(while (< n 200)
+(while (< n 2000)
   (transaction show-square-root (+ 1000000000 (* n 100000)))
   (setq n (+ n 1)))
diff --git a/duhton-c8/demo/micro_transactions.duh 
b/duhton-c8/demo/micro_transactions.duh
--- a/duhton-c8/demo/micro_transactions.duh
+++ b/duhton-c8/demo/micro_transactions.duh
@@ -10,7 +10,7 @@
 
 (defun big_transactions ()
   (setq n 0)
-  (while (< n 20000)
+  (while (< n 2000)
     (transaction increment)
     (setq n (+ n 1))
     )
diff --git a/duhton-c8/demo/synth.duh b/duhton-c8/demo/synth.duh
--- a/duhton-c8/demo/synth.duh
+++ b/duhton-c8/demo/synth.duh
@@ -19,7 +19,7 @@
   (setq y (get lst 1))
   (setq z (get lst 2))
   (setq w (get lst 3))
-  
+
   (setq t (^ x (<< x 11)))
   (setq x y)
   (setq y z)
@@ -55,14 +55,14 @@
         (set shared (+ (get shared) 1))
       (set private (+ (get private) 1))
       )
-    
+
     (setq i (+ i 1))
     )
   )
 
 
 
-(setq N 1000)
+(setq N 5000)
 ;; CONFL_IF_BELOW / RAND_MAX == ratio of conflicting transactions
 ;;                              to non conflicting ones
 (setq RAND_MAX 8)
@@ -95,4 +95,3 @@
 (run-transactions)
 (print (quote run-time-diff:) (- (time) timer))
 (print (quote shared) (get shared))
-
diff --git a/duhton-c8/demo/trees2.duh b/duhton-c8/demo/trees2.duh
--- a/duhton-c8/demo/trees2.duh
+++ b/duhton-c8/demo/trees2.duh
@@ -11,11 +11,11 @@
    )
 )
 
-(defun lookup-tree ()
-   (walk-tree (create-tree 10))
-)
+
 
 (setq n 0)
-(while (< n 1000)
-   (transaction lookup-tree)
+(setq tree (create-tree 20))
+(print (quote tree-created))
+(while (< n 100)
+   (transaction walk-tree tree)
    (setq n (+ n 1)))
diff --git a/duhton/demo/many_square_roots.duh 
b/duhton/demo/many_square_roots.duh
--- a/duhton/demo/many_square_roots.duh
+++ b/duhton/demo/many_square_roots.duh
@@ -8,10 +8,11 @@
 
 (defun show-square-root (n)
   (setq s (square-root n))
-  (print (quote square-root-of) n (quote is) s))
+  (print (quote square-root-of) n (quote is) s)
+  )
 
 
 (setq n 0)
-(while (< n 200)
+(while (< n 2000)
   (transaction show-square-root (+ 1000000000 (* n 100000)))
   (setq n (+ n 1)))
diff --git a/duhton/demo/micro_transactions.duh 
b/duhton/demo/micro_transactions.duh
--- a/duhton/demo/micro_transactions.duh
+++ b/duhton/demo/micro_transactions.duh
@@ -10,7 +10,7 @@
 
 (defun big_transactions ()
   (setq n 0)
-  (while (< n 20000)
+  (while (< n 2000)
     (transaction increment)
     (setq n (+ n 1))
     )
diff --git a/duhton/demo/synth.duh b/duhton/demo/synth.duh
--- a/duhton/demo/synth.duh
+++ b/duhton/demo/synth.duh
@@ -19,7 +19,7 @@
   (setq y (get lst 1))
   (setq z (get lst 2))
   (setq w (get lst 3))
-  
+
   (setq t (^ x (<< x 11)))
   (setq x y)
   (setq y z)
@@ -55,14 +55,14 @@
         (set shared (+ (get shared) 1))
       (set private (+ (get private) 1))
       )
-    
+
     (setq i (+ i 1))
     )
   )
 
 
 
-(setq N 1000)
+(setq N 5000)
 ;; CONFL_IF_BELOW / RAND_MAX == ratio of conflicting transactions
 ;;                              to non conflicting ones
 (setq RAND_MAX 8)
@@ -95,4 +95,3 @@
 (run-transactions)
 (print (quote run-time-diff:) (- (time) timer))
 (print (quote shared) (get shared))
-
diff --git a/duhton/demo/trees2.duh b/duhton/demo/trees2.duh
--- a/duhton/demo/trees2.duh
+++ b/duhton/demo/trees2.duh
@@ -11,11 +11,11 @@
    )
 )
 
-(defun lookup-tree ()
-   (walk-tree (create-tree 10))
-)
+
 
 (setq n 0)
-(while (< n 1000)
-   (transaction lookup-tree)
+(setq tree (create-tree 20))
+(print (quote tree-created))
+(while (< n 100)
+   (transaction walk-tree tree)
    (setq n (+ n 1)))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to