Details
-
Type:
Enhancement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Patch:Code and Test
-
Approval:Ok
Description
Implement mandelbrot as described at http://shootout.alioth.debian.org/. See http://dev.clojure.org/display/testbenchmark/Alioth+Benchmarks for an overview.
Attachments
Activity
Stuart Halloway
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Approval | Ok [ 10007 ] | |
| Waiting On | stu |
Stuart Halloway
made changes -
| Status | Open [ 1 ] | Closed [ 6 ] |
| Resolution | Completed [ 1 ] |
This is a first pass at a mandelbrot that takes advantage of clojure 1.3 performance features.
Approach:
Avoid idiomatic functional code.
Extensive iteration, in-place mutation, primitive arrays, manage our own threads etc. Not "pretty."
(currently .8 to .9 % of fastest java version).
Tests:
Correctness tests, verified against a set of known-good resource files.
Caveats:
This is the first pass and my first time writing optimized clojure 1.3. I'm sure there are things that can be improved, so any feedback welcome.
Future:
I've included a modified version of the fastest java program in the patch as I've found it useful for comparison
(# time script/run_java alioth.java.mandelbrot 16000)
One thing we don't have is repeatable performance metrics/tests.
One approach would be to have tests that fail whenever the clojure version falls below a certain percentage of the java version.
That's something I'm working on.