Find file History
Pull request Compare This branch is 145 commits behind jafingerhut:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
..
Failed to load latest commit information.
other-code
README
batch.sh
clj-compile.sh
clj-run.sh
ghc-compile.sh
ghc-run.sh
java-compile.sh
java-run.sh
mandelbrot.andys.java
mandelbrot.clj-1.clj
mandelbrot.clj-10.clj
mandelbrot.clj-2.clj
mandelbrot.clj-3.clj
mandelbrot.clj-4.clj
mandelbrot.clj-5.clj
mandelbrot.clj-6.clj
mandelbrot.clj-7.clj
mandelbrot.clj-8.clj
mandelbrot.clj-9-par-1.3.clj
mandelbrot.clj-9-par.clj
mandelbrot.clj-9-seq.clj
mandelbrot.conses-too-much1.clj
mandelbrot.conses-too-much2.clj
mandelbrot.ghc-2.ghc
mandelbrot.java-2.java
mandelbrot.java-3.java
mandelbrot.java-6.java
mandelbrot.jruby
mandelbrot.jruby-2.jruby
mandelbrot.no-threads.java
mandelbrot.no-threads.perl
mandelbrot.perl
mandelbrot.sbcl
mandelbrot.sbcl_compile
mandelbrot.sbcl_run
mandelbrot.scala-3.scala
sbcl-compile.sh
sbcl-run.sh
scala-compile.sh

README

Results for different numbers of threads, the first parameter of the
function modified-pmap in mandelbrot.clj-2.clj

The 1-thread test uses the sequential function map over pixel rows.
The tests with 2 or more threads use my function modified-pmap, which
I have some experimental evidence never run more than the specified
number of threads at a time, and only have fewer threads running for a
small fraction of the time, after noticing one has finished, and
before starting up the next one.

----------------------------------------------------------------------
These were all produced on my iMac, whose specs are given in the
RESULTS file.

                         Threads
Test             1          2          3          4
------       ---------  ---------  ---------  ---------
quick   real 0m 2.783s  0m 2.188s  0m 2.036s  0m 2.060s
	user 0m 2.945s	0m 2.994s  0m 2.797s  0m 2.844s
	sys  0m 0.302s	0m 0.303s  0m 0.286s  0m 0.289s

medium  real 0m 7.394s	0m 5.688s  0m 5.786s  0m 5.994s
	user 0m 8.089s	0m 9.188s  0m 9.095s  0m 9.746s
	sys  0m 0.655s	0m 0.796s  0m 0.773s  0m 0.784s

long    real 5m28.011s  3m 4.186s  3m 5.168s  3m 4.100s
	user 5m27.926s	5m36.292s  5m34.456s  5m36.090s
	sys  0m 3.024s	0m 4.824s  0m 4.825s  0m 4.852s


----------------------------------------------------------------------
Results on my MacBook Pro, with these specs:

2.2 GHz Intel Core 2 Duo (2 cores)
2 GB 667 MHz DDR2 SDRAM
Mac OS X 10.5.7

I'm surprised that the user time is so much higher for 2 or more
threads, vs. the 1-thread case, at least for the long test.  I'd like
to know why that happens.

                         Threads
Test             1          2          3
------       ---------  ---------  ---------
quick   real 0m 2.093s  0m 2.062s  0m 2.014s
	user 0m 2.860s	0m 2.860s  0m 2.779s
	sys  0m 0.276s	0m 0.274s  0m 0.278s
				   	 
medium  real 0m 7.184s	0m 5.524s  0m 5.822s
	user 0m 7.761s	0m 8.768s  0m 9.344s
	sys  0m 0.598s	0m 0.707s  0m 0.681s
				   	 
long    real 7m 2.059s	4m52.300s  4m56.908s
	user 6m58.475s	8m48.858s  8m46.856s
	sys  0m 4.015s	0m 6.903s  0m 7.267s