diff --git a/example/dining-philosophers.stmx-hw.lisp b/example/dining-philosophers.stmx-hw.lisp index ce8e493..f6b3cbb 100644 --- a/example/dining-philosophers.stmx-hw.lisp +++ b/example/dining-philosophers.stmx-hw.lisp @@ -238,7 +238,7 @@ (let* ((end (get-internal-real-time)) (elapsed-secs (/ (- end start) (float internal-time-units-per-second))) - (elapsed-secs (max elapsed-secs 0.000000001)) + (elapsed-secs (max elapsed-secs 1f-9)) (tx-count (/ (* n philosophers-initial-hunger) elapsed-secs)) (tx-unit "")) diff --git a/example/dining-philosophers.stmx.lisp b/example/dining-philosophers.stmx.lisp index 1f43f5d..ad487ce 100644 --- a/example/dining-philosophers.stmx.lisp +++ b/example/dining-philosophers.stmx.lisp @@ -146,7 +146,7 @@ (let* ((end (get-internal-real-time)) (elapsed-secs (/ (- end start) (float internal-time-units-per-second))) - (elapsed-secs (max elapsed-secs 0.000000001)) + (elapsed-secs (max elapsed-secs 1f-9)) (tx-count (/ (* n philosophers-initial-hunger) elapsed-secs)) (tx-unit "")) diff --git a/example/parallel.lisp b/example/parallel.lisp index 03bba52..9593421 100644 --- a/example/parallel.lisp +++ b/example/parallel.lisp @@ -84,7 +84,7 @@ (let* ((end (get-internal-real-time)) (elapsed-secs (/ (- end start) (float internal-time-units-per-second))) - (elapsed-secs (max elapsed-secs 0.000000001)) + (elapsed-secs (max elapsed-secs 1f-9)) (tx-speed/thread (/ iterations elapsed-secs))) (format t "(:n-threads ~S :tx-speed ~,3E :tx-speed/thread ~,3E) ;;~3$ secs~%" @@ -95,127 +95,127 @@ (:cpu 'intel-core-i7-4770 :cores 4 :hyper-threading t :global-clock :gv6 :algorithm '(atomic $) - (:n-threads 1 :tx-speed 39.2e6 :tx-speed/thread 39.25e6) ;;2.548 secs - (:n-threads 2 :tx-speed 77.8e6 :tx-speed/thread 38.93e6) ;;2.569 secs - (:n-threads 3 :tx-speed 116.7e6 :tx-speed/thread 38.90e6) ;;2.571 secs - (:n-threads 4 :tx-speed 152.3e6 :tx-speed/thread 38.07e6) ;;2.627 secs - (:n-threads 5 :tx-speed 146.2e6 :tx-speed/thread 29.23e6) ;;3.421 secs - (:n-threads 6 :tx-speed 173.6e6 :tx-speed/thread 28.94e6) ;;3.456 secs - (:n-threads 7 :tx-speed 188.5e6 :tx-speed/thread 26.93e6) ;;3.713 secs - (:n-threads 8 :tx-speed 208.8e6 :tx-speed/thread 26.10e6) ;;3.831 secs - (:n-threads 9 :tx-speed 176.5e6 :tx-speed/thread 19.61e6) ;;5.100 secs - (:n-threads 10 :tx-speed 194.1e6 :tx-speed/thread 19.41e6) ;;5.153 secs - (:n-threads 11 :tx-speed 196.8e6 :tx-speed/thread 17.89e6) ;;5.590 secs - (:n-threads 12 :tx-speed 208.1e6 :tx-speed/thread 17.34e6) ;;5.767 secs - (:n-threads 14 :tx-speed 208.9e6 :tx-speed/thread 14.92e6) ;;6.702 secs - (:n-threads 16 :tx-speed 202.9e6 :tx-speed/thread 12.68e6) ;;7.885 secs - (:n-threads 20 :tx-speed 207.9e6 :tx-speed/thread 10.40e6) ;;9.618 secs - (:n-threads 24 :tx-speed 206.5e6 :tx-speed/thread 8.60e6) ;;11.623 secs - (:n-threads 32 :tx-speed 208.7e6 :tx-speed/thread 6.52e6) ;;15.330 secs - (:n-threads 48 :tx-speed 208.3e6 :tx-speed/thread 4.34e6) ;;23.042 secs - (:n-threads 64 :tx-speed 209.8e6 :tx-speed/thread 3.28e6) ;;30.504 secs - (:n-threads 96 :tx-speed 209.9e6 :tx-speed/thread 2.19e6) ;;45.738 secs - (:n-threads 128 :tx-speed 211.5e6 :tx-speed/thread 1.65e6));;60.517 secs + (:n-threads 1 :tx-speed 39.2f6 :tx-speed/thread 39.25f6) ;;2.548 secs + (:n-threads 2 :tx-speed 77.8f6 :tx-speed/thread 38.93f6) ;;2.569 secs + (:n-threads 3 :tx-speed 116.7f6 :tx-speed/thread 38.90f6) ;;2.571 secs + (:n-threads 4 :tx-speed 152.3f6 :tx-speed/thread 38.07f6) ;;2.627 secs + (:n-threads 5 :tx-speed 146.2f6 :tx-speed/thread 29.23f6) ;;3.421 secs + (:n-threads 6 :tx-speed 173.6f6 :tx-speed/thread 28.94f6) ;;3.456 secs + (:n-threads 7 :tx-speed 188.5f6 :tx-speed/thread 26.93f6) ;;3.713 secs + (:n-threads 8 :tx-speed 208.8f6 :tx-speed/thread 26.10f6) ;;3.831 secs + (:n-threads 9 :tx-speed 176.5f6 :tx-speed/thread 19.61f6) ;;5.100 secs + (:n-threads 10 :tx-speed 194.1f6 :tx-speed/thread 19.41f6) ;;5.153 secs + (:n-threads 11 :tx-speed 196.8f6 :tx-speed/thread 17.89f6) ;;5.590 secs + (:n-threads 12 :tx-speed 208.1f6 :tx-speed/thread 17.34f6) ;;5.767 secs + (:n-threads 14 :tx-speed 208.9f6 :tx-speed/thread 14.92f6) ;;6.702 secs + (:n-threads 16 :tx-speed 202.9f6 :tx-speed/thread 12.68f6) ;;7.885 secs + (:n-threads 20 :tx-speed 207.9f6 :tx-speed/thread 10.40f6) ;;9.618 secs + (:n-threads 24 :tx-speed 206.5f6 :tx-speed/thread 8.60f6) ;;11.623 secs + (:n-threads 32 :tx-speed 208.7f6 :tx-speed/thread 6.52f6) ;;15.330 secs + (:n-threads 48 :tx-speed 208.3f6 :tx-speed/thread 4.34f6) ;;23.042 secs + (:n-threads 64 :tx-speed 209.8f6 :tx-speed/thread 3.28f6) ;;30.504 secs + (:n-threads 96 :tx-speed 209.9f6 :tx-speed/thread 2.19f6) ;;45.738 secs + (:n-threads 128 :tx-speed 211.5f6 :tx-speed/thread 1.65f6));;60.517 secs (:cpu 'intel-core-i7-4770 :cores 4 :hyper-threading t :global-clock :gv5 :algorithm '(atomic $) - (:n-threads 1 :tx-speed 37.3e6 :tx-speed/thread 37.30e6) ;;2.681 secs - (:n-threads 2 :tx-speed 74.6e6 :tx-speed/thread 37.31e6) ;;2.680 secs - (:n-threads 3 :tx-speed 111.6e6 :tx-speed/thread 37.22e6) ;;2.688 secs - (:n-threads 4 :tx-speed 148.9e6 :tx-speed/thread 37.22e6) ;;2.686 secs - (:n-threads 5 :tx-speed 154.6e6 :tx-speed/thread 30.96e6) ;;3.234 secs - (:n-threads 6 :tx-speed 185.8e6 :tx-speed/thread 30.96e6) ;;3.230 secs - (:n-threads 7 :tx-speed 209.8e6 :tx-speed/thread 29.98e6) ;;3.336 secs - (:n-threads 8 :tx-speed 237.5e6 :tx-speed/thread 29.68e6) ;;3.369 secs - (:n-threads 9 :tx-speed 191.5e6 :tx-speed/thread 21.28e6) ;;4.700 secs - (:n-threads 10 :tx-speed 212.0e6 :tx-speed/thread 21.20e6) ;;4.716 secs - (:n-threads 11 :tx-speed 202.1e6 :tx-speed/thread 18.38e6) ;;5.442 secs - (:n-threads 12 :tx-speed 219.3e6 :tx-speed/thread 18.27e6) ;;5.473 secs - (:n-threads 14 :tx-speed 229.9e6 :tx-speed/thread 16.42e6) ;;6.090 secs - (:n-threads 16 :tx-speed 233.5e6 :tx-speed/thread 14.60e6) ;;6.851 secs - (:n-threads 20 :tx-speed 231.8e6 :tx-speed/thread 11.59e6) ;;8.627 secs - (:n-threads 24 :tx-speed 230.0e6 :tx-speed/thread 9.58e6) ;;10.436 secs - (:n-threads 32 :tx-speed 234.4e6 :tx-speed/thread 7.32e6) ;;13.654 secs - (:n-threads 48 :tx-speed 236.6e6 :tx-speed/thread 4.93e6) ;;20.286 secs - (:n-threads 64 :tx-speed 236.7e6 :tx-speed/thread 3.67e6) ;;27.042 secs - (:n-threads 96 :tx-speed 237.2e6 :tx-speed/thread 2.47e6) ;;40.471 secs - (:n-threads 128 :tx-speed 237.0e6 :tx-speed/thread 1.85e6));;54.014 secs + (:n-threads 1 :tx-speed 37.3f6 :tx-speed/thread 37.30f6) ;;2.681 secs + (:n-threads 2 :tx-speed 74.6f6 :tx-speed/thread 37.31f6) ;;2.680 secs + (:n-threads 3 :tx-speed 111.6f6 :tx-speed/thread 37.22f6) ;;2.688 secs + (:n-threads 4 :tx-speed 148.9f6 :tx-speed/thread 37.22f6) ;;2.686 secs + (:n-threads 5 :tx-speed 154.6f6 :tx-speed/thread 30.96f6) ;;3.234 secs + (:n-threads 6 :tx-speed 185.8f6 :tx-speed/thread 30.96f6) ;;3.230 secs + (:n-threads 7 :tx-speed 209.8f6 :tx-speed/thread 29.98f6) ;;3.336 secs + (:n-threads 8 :tx-speed 237.5f6 :tx-speed/thread 29.68f6) ;;3.369 secs + (:n-threads 9 :tx-speed 191.5f6 :tx-speed/thread 21.28f6) ;;4.700 secs + (:n-threads 10 :tx-speed 212.0f6 :tx-speed/thread 21.20f6) ;;4.716 secs + (:n-threads 11 :tx-speed 202.1f6 :tx-speed/thread 18.38f6) ;;5.442 secs + (:n-threads 12 :tx-speed 219.3f6 :tx-speed/thread 18.27f6) ;;5.473 secs + (:n-threads 14 :tx-speed 229.9f6 :tx-speed/thread 16.42f6) ;;6.090 secs + (:n-threads 16 :tx-speed 233.5f6 :tx-speed/thread 14.60f6) ;;6.851 secs + (:n-threads 20 :tx-speed 231.8f6 :tx-speed/thread 11.59f6) ;;8.627 secs + (:n-threads 24 :tx-speed 230.0f6 :tx-speed/thread 9.58f6) ;;10.436 secs + (:n-threads 32 :tx-speed 234.4f6 :tx-speed/thread 7.32f6) ;;13.654 secs + (:n-threads 48 :tx-speed 236.6f6 :tx-speed/thread 4.93f6) ;;20.286 secs + (:n-threads 64 :tx-speed 236.7f6 :tx-speed/thread 3.67f6) ;;27.042 secs + (:n-threads 96 :tx-speed 237.2f6 :tx-speed/thread 2.47f6) ;;40.471 secs + (:n-threads 128 :tx-speed 237.0f6 :tx-speed/thread 1.85f6));;54.014 secs (:cpu 'intel-core-i7-4770 :cores 4 :hyper-threading t :global-clock :gv6 :algorithm '(hw-atomic2 $-hwtx $-tx) - (:n-threads 1 :tx-speed 44.2e6 :tx-speed/thread 44.19e6) ;;2.263 secs - (:n-threads 2 :tx-speed 87.7e6 :tx-speed/thread 43.84e6) ;;2.284 secs - (:n-threads 3 :tx-speed 131.1e6 :tx-speed/thread 43.71e6) ;;2.288 secs - (:n-threads 4 :tx-speed 174.1e6 :tx-speed/thread 43.54e6) ;;2.297 secs - (:n-threads 5 :tx-speed 176.7e6 :tx-speed/thread 35.35e6) ;;2.829 secs - (:n-threads 6 :tx-speed 210.8e6 :tx-speed/thread 35.14e6) ;;2.846 secs - (:n-threads 7 :tx-speed 235.2e6 :tx-speed/thread 33.60e6) ;;2.976 secs - (:n-threads 8 :tx-speed 264.2e6 :tx-speed/thread 33.03e6) ;;3.028 secs - (:n-threads 9 :tx-speed 216.9e6 :tx-speed/thread 24.10e6) ;;4.149 secs - (:n-threads 10 :tx-speed 228.1e6 :tx-speed/thread 22.81e6) ;;4.384 secs - (:n-threads 11 :tx-speed 240.5e6 :tx-speed/thread 21.87e6) ;;4.573 secs - (:n-threads 12 :tx-speed 244.1e6 :tx-speed/thread 20.34e6) ;;4.916 secs - (:n-threads 14 :tx-speed 250.5e6 :tx-speed/thread 17.89e6) ;;5.589 secs - (:n-threads 16 :tx-speed 254.9e6 :tx-speed/thread 15.93e6) ;;6.276 secs - (:n-threads 20 :tx-speed 261.1e6 :tx-speed/thread 13.06e6) ;;7.659 secs - (:n-threads 24 :tx-speed 260.7e6 :tx-speed/thread 10.86e6) ;;9.207 secs - (:n-threads 32 :tx-speed 264.1e6 :tx-speed/thread 8.25e6) ;;12.118 secs - (:n-threads 48 :tx-speed 264.6e6 :tx-speed/thread 5.51e6) ;;18.139 secs - (:n-threads 64 :tx-speed 265.3e6 :tx-speed/thread 4.15e6) ;;24.121 secs - (:n-threads 96 :tx-speed 265.0e6 :tx-speed/thread 2.76e6) ;;36.230 secs - (:n-threads 128 :tx-speed 265.5e6 :tx-speed/thread 2.07e6));;48.202 secs + (:n-threads 1 :tx-speed 44.2f6 :tx-speed/thread 44.19f6) ;;2.263 secs + (:n-threads 2 :tx-speed 87.7f6 :tx-speed/thread 43.84f6) ;;2.284 secs + (:n-threads 3 :tx-speed 131.1f6 :tx-speed/thread 43.71f6) ;;2.288 secs + (:n-threads 4 :tx-speed 174.1f6 :tx-speed/thread 43.54f6) ;;2.297 secs + (:n-threads 5 :tx-speed 176.7f6 :tx-speed/thread 35.35f6) ;;2.829 secs + (:n-threads 6 :tx-speed 210.8f6 :tx-speed/thread 35.14f6) ;;2.846 secs + (:n-threads 7 :tx-speed 235.2f6 :tx-speed/thread 33.60f6) ;;2.976 secs + (:n-threads 8 :tx-speed 264.2f6 :tx-speed/thread 33.03f6) ;;3.028 secs + (:n-threads 9 :tx-speed 216.9f6 :tx-speed/thread 24.10f6) ;;4.149 secs + (:n-threads 10 :tx-speed 228.1f6 :tx-speed/thread 22.81f6) ;;4.384 secs + (:n-threads 11 :tx-speed 240.5f6 :tx-speed/thread 21.87f6) ;;4.573 secs + (:n-threads 12 :tx-speed 244.1f6 :tx-speed/thread 20.34f6) ;;4.916 secs + (:n-threads 14 :tx-speed 250.5f6 :tx-speed/thread 17.89f6) ;;5.589 secs + (:n-threads 16 :tx-speed 254.9f6 :tx-speed/thread 15.93f6) ;;6.276 secs + (:n-threads 20 :tx-speed 261.1f6 :tx-speed/thread 13.06f6) ;;7.659 secs + (:n-threads 24 :tx-speed 260.7f6 :tx-speed/thread 10.86f6) ;;9.207 secs + (:n-threads 32 :tx-speed 264.1f6 :tx-speed/thread 8.25f6) ;;12.118 secs + (:n-threads 48 :tx-speed 264.6f6 :tx-speed/thread 5.51f6) ;;18.139 secs + (:n-threads 64 :tx-speed 265.3f6 :tx-speed/thread 4.15f6) ;;24.121 secs + (:n-threads 96 :tx-speed 265.0f6 :tx-speed/thread 2.76f6) ;;36.230 secs + (:n-threads 128 :tx-speed 265.5f6 :tx-speed/thread 2.07f6));;48.202 secs (:cpu 'intel-core-i7-4770 :cores 4 :hyper-threading t :global-clock :gv5 :algorithm '(hw-atomic2 $-hwtx $-tx) - (:n-threads 1 :tx-speed 45.0e6 :tx-speed/thread 45.00e6) ;;2.222 secs - (:n-threads 2 :tx-speed 89.9e6 :tx-speed/thread 44.96e6) ;;2.226 secs - (:n-threads 3 :tx-speed 134.6e6 :tx-speed/thread 44.86e6) ;;2.229 secs - (:n-threads 4 :tx-speed 179.5e6 :tx-speed/thread 44.86e6) ;;2.229 secs - (:n-threads 5 :tx-speed 188.1e6 :tx-speed/thread 37.62e6) ;;2.658 secs - (:n-threads 6 :tx-speed 225.7e6 :tx-speed/thread 37.62e6) ;;2.658 secs - (:n-threads 7 :tx-speed 254.5e6 :tx-speed/thread 36.36e6) ;;2.750 secs - (:n-threads 8 :tx-speed 288.1e6 :tx-speed/thread 36.01e6) ;;2.777 secs - (:n-threads 9 :tx-speed 232.6e6 :tx-speed/thread 25.85e6) ;;3.869 secs - (:n-threads 10 :tx-speed 257.7e6 :tx-speed/thread 25.77e6) ;;3.880 secs - (:n-threads 11 :tx-speed 252.9e6 :tx-speed/thread 22.99e6) ;;4.350 secs - (:n-threads 12 :tx-speed 263.8e6 :tx-speed/thread 21.98e6) ;;4.549 secs - (:n-threads 14 :tx-speed 286.8e6 :tx-speed/thread 20.49e6) ;;4.881 secs - (:n-threads 16 :tx-speed 280.6e6 :tx-speed/thread 17.53e6) ;;5.703 secs - (:n-threads 20 :tx-speed 288.7e6 :tx-speed/thread 14.44e6) ;;6.927 secs - (:n-threads 24 :tx-speed 286.4e6 :tx-speed/thread 11.93e6) ;;8.379 secs - (:n-threads 32 :tx-speed 288.2e6 :tx-speed/thread 9.01e6) ;;11.104 secs - (:n-threads 48 :tx-speed 289.2e6 :tx-speed/thread 6.02e6) ;;16.599 secs - (:n-threads 64 :tx-speed 290.0e6 :tx-speed/thread 4.53e6) ;;22.069 secs - (:n-threads 96 :tx-speed 289.8e6 :tx-speed/thread 3.02e6) ;;33.121 secs - (:n-threads 128 :tx-speed 290.1e6 :tx-speed/thread 2.27e6));;44.125 secs + (:n-threads 1 :tx-speed 45.0f6 :tx-speed/thread 45.00f6) ;;2.222 secs + (:n-threads 2 :tx-speed 89.9f6 :tx-speed/thread 44.96f6) ;;2.226 secs + (:n-threads 3 :tx-speed 134.6f6 :tx-speed/thread 44.86f6) ;;2.229 secs + (:n-threads 4 :tx-speed 179.5f6 :tx-speed/thread 44.86f6) ;;2.229 secs + (:n-threads 5 :tx-speed 188.1f6 :tx-speed/thread 37.62f6) ;;2.658 secs + (:n-threads 6 :tx-speed 225.7f6 :tx-speed/thread 37.62f6) ;;2.658 secs + (:n-threads 7 :tx-speed 254.5f6 :tx-speed/thread 36.36f6) ;;2.750 secs + (:n-threads 8 :tx-speed 288.1f6 :tx-speed/thread 36.01f6) ;;2.777 secs + (:n-threads 9 :tx-speed 232.6f6 :tx-speed/thread 25.85f6) ;;3.869 secs + (:n-threads 10 :tx-speed 257.7f6 :tx-speed/thread 25.77f6) ;;3.880 secs + (:n-threads 11 :tx-speed 252.9f6 :tx-speed/thread 22.99f6) ;;4.350 secs + (:n-threads 12 :tx-speed 263.8f6 :tx-speed/thread 21.98f6) ;;4.549 secs + (:n-threads 14 :tx-speed 286.8f6 :tx-speed/thread 20.49f6) ;;4.881 secs + (:n-threads 16 :tx-speed 280.6f6 :tx-speed/thread 17.53f6) ;;5.703 secs + (:n-threads 20 :tx-speed 288.7f6 :tx-speed/thread 14.44f6) ;;6.927 secs + (:n-threads 24 :tx-speed 286.4f6 :tx-speed/thread 11.93f6) ;;8.379 secs + (:n-threads 32 :tx-speed 288.2f6 :tx-speed/thread 9.01f6) ;;11.104 secs + (:n-threads 48 :tx-speed 289.2f6 :tx-speed/thread 6.02f6) ;;16.599 secs + (:n-threads 64 :tx-speed 290.0f6 :tx-speed/thread 4.53f6) ;;22.069 secs + (:n-threads 96 :tx-speed 289.8f6 :tx-speed/thread 3.02f6) ;;33.121 secs + (:n-threads 128 :tx-speed 290.1f6 :tx-speed/thread 2.27f6));;44.125 secs (:cpu 'intel-core-i7-4770 :cores 4 :hyper-threading t :global-clock :irrelevant :algorithm '(transaction-begin tvar-value transaction-end) - (:n-threads 1 :tx-speed 51.4e6 :tx-speed/thread 51.44e6) ;;1.944 secs - (:n-threads 2 :tx-speed 102.7e6 :tx-speed/thread 51.33e6) ;;1.948 secs - (:n-threads 3 :tx-speed 153.9e6 :tx-speed/thread 51.31e6) ;;1.949 secs - (:n-threads 4 :tx-speed 204.9e6 :tx-speed/thread 51.23e6) ;;1.952 secs - (:n-threads 5 :tx-speed 247.5e6 :tx-speed/thread 49.50e6) ;;2.020 secs - (:n-threads 6 :tx-speed 296.7e6 :tx-speed/thread 49.46e6) ;;2.022 secs - (:n-threads 7 :tx-speed 345.3e6 :tx-speed/thread 49.33e6) ;;2.027 secs - (:n-threads 8 :tx-speed 394.9e6 :tx-speed/thread 49.36e6) ;;2.026 secs - (:n-threads 9 :tx-speed 300.0e6 :tx-speed/thread 33.33e6) ;;3.000 secs - (:n-threads 10 :tx-speed 327.9e6 :tx-speed/thread 32.79e6) ;;3.050 secs - (:n-threads 11 :tx-speed 329.4e6 :tx-speed/thread 29.95e6) ;;3.339 secs - (:n-threads 12 :tx-speed 354.3e6 :tx-speed/thread 29.52e6) ;;3.387 secs - (:n-threads 14 :tx-speed 389.0e6 :tx-speed/thread 27.79e6) ;;3.599 secs - (:n-threads 16 :tx-speed 380.2e6 :tx-speed/thread 23.76e6) ;;4.208 secs - (:n-threads 20 :tx-speed 389.4e6 :tx-speed/thread 19.47e6) ;;5.136 secs - (:n-threads 24 :tx-speed 387.8e6 :tx-speed/thread 16.16e6) ;;6.188 secs - (:n-threads 32 :tx-speed 389.1e6 :tx-speed/thread 12.16e6) ;;8.225 secs - (:n-threads 48 :tx-speed 391.4e6 :tx-speed/thread 8.16e6) ;;12.263 secs - (:n-threads 64 :tx-speed 393.8e6 :tx-speed/thread 6.15e6) ;;16.250 secs - (:n-threads 96 :tx-speed 394.4e6 :tx-speed/thread 4.11e6) ;;24.341 secs - (:n-threads 128 :tx-speed 393.9e6 :tx-speed/thread 3.08e6));;32.492 secs + (:n-threads 1 :tx-speed 51.4f6 :tx-speed/thread 51.44f6) ;;1.944 secs + (:n-threads 2 :tx-speed 102.7f6 :tx-speed/thread 51.33f6) ;;1.948 secs + (:n-threads 3 :tx-speed 153.9f6 :tx-speed/thread 51.31f6) ;;1.949 secs + (:n-threads 4 :tx-speed 204.9f6 :tx-speed/thread 51.23f6) ;;1.952 secs + (:n-threads 5 :tx-speed 247.5f6 :tx-speed/thread 49.50f6) ;;2.020 secs + (:n-threads 6 :tx-speed 296.7f6 :tx-speed/thread 49.46f6) ;;2.022 secs + (:n-threads 7 :tx-speed 345.3f6 :tx-speed/thread 49.33f6) ;;2.027 secs + (:n-threads 8 :tx-speed 394.9f6 :tx-speed/thread 49.36f6) ;;2.026 secs + (:n-threads 9 :tx-speed 300.0f6 :tx-speed/thread 33.33f6) ;;3.000 secs + (:n-threads 10 :tx-speed 327.9f6 :tx-speed/thread 32.79f6) ;;3.050 secs + (:n-threads 11 :tx-speed 329.4f6 :tx-speed/thread 29.95f6) ;;3.339 secs + (:n-threads 12 :tx-speed 354.3f6 :tx-speed/thread 29.52f6) ;;3.387 secs + (:n-threads 14 :tx-speed 389.0f6 :tx-speed/thread 27.79f6) ;;3.599 secs + (:n-threads 16 :tx-speed 380.2f6 :tx-speed/thread 23.76f6) ;;4.208 secs + (:n-threads 20 :tx-speed 389.4f6 :tx-speed/thread 19.47f6) ;;5.136 secs + (:n-threads 24 :tx-speed 387.8f6 :tx-speed/thread 16.16f6) ;;6.188 secs + (:n-threads 32 :tx-speed 389.1f6 :tx-speed/thread 12.16f6) ;;8.225 secs + (:n-threads 48 :tx-speed 391.4f6 :tx-speed/thread 8.16f6) ;;12.263 secs + (:n-threads 64 :tx-speed 393.8f6 :tx-speed/thread 6.15f6) ;;16.250 secs + (:n-threads 96 :tx-speed 394.4f6 :tx-speed/thread 4.11f6) ;;24.341 secs + (:n-threads 128 :tx-speed 393.9f6 :tx-speed/thread 3.08f6));;32.492 secs ) \ No newline at end of file diff --git a/test/orelse.lisp b/test/orelse.lisp index 0f00542..710f996 100644 --- a/test/orelse.lisp +++ b/test/orelse.lisp @@ -94,7 +94,7 @@ (declare (type fixnum iterations) (type simple-vector cells names)) - (let ((x 0.0) + (let ((x 0.0f0) (name nil)) (declare (type single-float x)) (dotimes (i iterations) @@ -192,14 +192,14 @@ and finishes after each thread executed ITERATIONS loops, returning the final ce (start-thread #'f2 :name "C") (start-thread #'f2 :name "D")) - (sleep 0.01) + (sleep 1f-2) (log:debug "setting the four cell values...") (atomic (dotimes (i 4) - (put (svref cells1 i) (* i 0.25)) + (put (svref cells1 i) (* i 0.25f0)) (log:debug "put ~A in cell ~A (may retry)" - (* i 0.25) (svref names1 i)))) + (* i 0.25f0) (svref names1 i)))) (log:debug "...cells values set") (values @@ -222,10 +222,10 @@ and finishes after each thread executed ITERATIONS loops, returning the final ce (is-true (numberp e)))) (let1 remainders (sort (loop for v in cells collect (mod v 1)) #'<) - (is-true (equalp '(0.0 0.25 0.5 0.75) remainders))) + (is-true (equalp '(0.0f0 0.25f0 0.5f0 0.75f0) remainders))) (let1 total (apply #'+ cells) - (is-true (= total (+ 1.5 (* 4 iterations))))))) + (is-true (= total (+ 1.5f0 (* 4 iterations))))))) (def-test orelse-thread4 (:compile-at :definition-time) (orelse-thread4-test 10000)) diff --git a/test/retry.lisp b/test/retry.lisp index a8cba8e..550faeb 100644 --- a/test/retry.lisp +++ b/test/retry.lisp @@ -40,7 +40,7 @@ (type tcell c1 c2)) (flet ((f1 () - (let1 x 0.0 + (let1 x 0.0f0 (declare (type single-float x)) (dotimes (i n) (log:trace " <= R") @@ -52,7 +52,7 @@ x)) (f2 () - (let1 x 0.0 + (let1 x 0.0f0 (declare (type single-float x)) (dotimes (i n) (log:trace "L =>") @@ -81,8 +81,8 @@ (start-thread f2 :name "Y")) (atomic (when two-tokens - (put c1 0.0)) - (put c2 0.5)) + (put c1 0.0f0)) + (put c2 0.5f0)) (let1 xs (loop for th in ths collect (wait4-thread th)) @@ -91,7 +91,7 @@ (defun retry-thread4-test (iterations) - (let ((expected (+ 0.5 (* 2 iterations)))) + (let ((expected (+ 0.5f0 (* 2 iterations)))) (multiple-value-bind (xs cs) (retry-thread4 :two-tokens nil :iterations iterations) (destructuring-bind (x1 x2 x3 x4) xs