/mobile Handheld Friendly website
Ubuntu : Intel® Q6600® quad-core |
Each table row shows performance measurements for this Clojure program with a particular command-line input value N.
| N | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|---|---|---|---|---|
| 500,000 | 14.01 | 5.33 | 316,588 | 348 | 80% 73% 68% 42% |
| 5,000,000 | 26.70 | 16.25 | 406,544 | 348 | 49% 56% 27% 31% |
| 50,000,000 | 149.95 | 125.37 | 407,644 | 348 | 39% 40% 18% 19% |
Read the ↓ make, command line, and program output logs to see how this program was run.
Read thread-ring benchmark to see what this program should do.
java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) Server VM (build 23.6-b04, mixed mode)
Clojure 1.4.0
;; The Computer Language Benchmarks Game ;; http://benchmarksgame.alioth.debian.org/ ;; ;; contributed by Jesse Rosenstock (ns threadring (:gen-class)) (set! *warn-on-reflection* true) (defn pass-message [the-agent ^Integer value first-agent] (if (zero? value) (do (println (:num the-agent)) (shutdown-agents) (System/exit 0)) ; Pass to the next agent if we're not at the end of the line, ; otherwise back to the first. (send (if (:next the-agent) (:next the-agent) first-agent) pass-message (dec value) first-agent)) the-agent) (defn pass-messages [^Integer num-agents ^Integer num-messages] (let [first-agent (reduce (fn [next-agent agent-num] (agent {:next next-agent :num agent-num})) nil (range num-agents 0 -1))] (send first-agent pass-message num-messages first-agent))) (defn -main [& args] (let [num-messages (if (empty? args) 1000 (Integer/valueOf (first args)))] (pass-messages 503 num-messages)))
Mon, 04 Mar 2013 02:50:47 GMT MAKE: mv threadring.clojure threadring.clj /usr/local/src/jdk1.7.0_11/bin/java -Dclojure.compile.path=. -cp .:/usr/local/src/clojure-1.5.0/clojure-1.5.0-slim.jar clojure.lang.Compile threadring Compiling threadring to . Reflection warning, threadring.clj:37:24 - call to valueOf can't be resolved. 5.31s to complete and log all make actions COMMAND LINE: /usr/local/src/jdk1.7.0_11/bin/java -server -XX:+TieredCompilation -XX:+AggressiveOpts -cp .:/usr/local/src/clojure-1.5.0/clojure-1.5.0-slim.jar threadring 50000000 PROGRAM OUTPUT: 292