Permalink
Browse files

* README.markdown: tweak language

  • Loading branch information...
1 parent 5e4dd89 commit 74aafa4289707775e40287d50d6aeca05e6f1824 @swannodette swannodette committed Jan 22, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 README.markdown
View
@@ -51,7 +51,7 @@ There are a number of completed benchmarks, but there is a lot more left to do.
Andy Fingerhut has a suit of benchmarks tailored for Clojure 1.2 and need updated or redone for Clojure 1.3 (https://github.com/jafingerhut/clojure-benchmarks).
A good general approach is to examine the fastest alioth implementations, usually Java or C, and write a Clojure port.
-Idiomatic Clojure typically shows poorly in the benchmarks. Liberal use of primitive arrays, type hinting, and iteration apply.
+Fast small programs in any language are also worthy of examination. These benchmarks should demonstrate how to write idiomatic high-performance Clojure.
Long term goal is a performance regression test suit ...

3 comments on commit 74aafa4

Member

pmbauer replied Jan 23, 2012

Pure functional code in Clojure seldom performs as optimally as the Java equivalent, largely due to memory allocation and garbage collection overhead. One could argue iterative techniques in Clojure are idiomatic, but I wouldn't.

Member

pmbauer replied Jan 23, 2012

To clarify, techniques in the benchmark code shouldn't be looked at as a model for general Clojure best practices, but only as a model for when performance requirements are critical and we don't want to drop to straight Java code.

Member

swannodette replied Jan 23, 2012

type hints, deftype, definterface, protocols, primitive fns, fn inlining, primitive arrays are all lightly (or poorly) documented useful, existing tools. In general the benchmarks should show how to tastefully combine them to solve particular kinds of problems efficiently. I'm not arguing that we should write most Clojure code this way - but I think the benchmarks should communicate best practices when writing that kind of code.

Please sign in to comment.