Error formatting macro: pagetree: java.lang.NullPointerException

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here is a summary of results for some program elapsed times and how spread out the hash values are:.  Below the table are a few details on how these measurements were made.

Problem

Using Clojure 1.6.0-alpha1 alpha3 hash (same as Clojure 1.5.1)

Using Mark Engelberg's 2013-1011-30 18 proposed hash
Paul Butcher's N-queens problem with 6x6 board

Elapsed time: ~7 min6.7 min (~33 times slower than with 2013-11-18 proposed hash)

180,568 solutions hash to 3,013 distinct hash values

average of 59.3 9 solutions per hash value (max 2,492)

Elapsed time: ~12 12.2 sec

180,568 solution hash to 180,563 566 distinct hash values

average of 1.0 solutions per hash value (max 2)

with 6x9 board

Elapsed time: > 8 hours (did not wait for it to finish)

20,136,752 solutions hash to 17,936 distinct hash values

average of 1,122.7 solutions per hash value (max 81,610)

Elapsed time: 11.8 4 min

20,136,752 solutions hash to 20,089,488 766 distinct hash values

average of 1.0 solutions per hash value (max 34)

Compile Clojure 1.6.0-alpha1 alpha3 source with "ant jar", so no tests run

Elapsed time: avg 51 20.1 sec

(min 5019.6, max 53)20.9)

raw measurements: 19.6, 20.2, 20.9, 19.8, 19.8

Elapsed time: avg 5020.6 0 sec

(min 5019.6, max 51)20.7)

raw measurements: 19.9, 20.2, 19.6, 20.7, 19.7

Compile Clojure 1.6.0-alpha1 alpha3 source with "ant", which includes running tests, but with generative test duration reduced to 1.0 sec

Elapsed time: avg 7648.6 0 sec

(min 7547.3, max 80)49.5)

raw measurements: 47.6, 49.5, 47.3, 47.4, 48.3

120,353 unique values hash to 113,405 distinct hash values

average of 1.06 values per hash value

Elapsed time: avg 7648.0 sec

(min 7547.1, max 78)49.5)

raw measurements: 47.1, 48.2, 47.6, 47.7, 49.5

119,811 unique values hash to 114,329 distinct hash values

average of 1.05 values per hash value

Calc hashes of all integers in (range 100000000) and return sum, using:

(time (hash-of-range 100000000))

See here for definition of hash-of-range

time: avg 3.35 sec

(min 3.31, max 3.39)

time: avg 3.76 sec (12.4% longer)

(min 3.40, max 3.91)

Calc hashes of all vectors [] [0] [0 1], etc. up to [0 1 ... 19999] and return sum, using

(let [cs (doall (reductions conj [] (range 20000)))]

  (time (total-hash cs)))

See here for definition of total-hash

time: avg 7.08 sec

(min 6.94, max 7.19)

time: avg 7.32 sec (3.4% longer)

(min 7.27, max 7.36)

Calc hashes of all sets #{} #{0} #{0 1}, etc. up to #{0 1 ... 19999} and return sum, using

(let [cs (doall (reductions conj #{} (range 20000)))]

  (time (total-hash cs)))

time: avg 22.11 sec

(min 17.51, max 23.72)

time: avg 22.99 sec (4.0% longer)

(min 22.58, max 23.50)

Calc hashes of all maps {} {0 1} {0 1, 1 2} ... up to {0 1, 1 2, ..., 19999 20000} and return sum, using

(let [cs (doall (reductions (fn [m i] (assoc m i (inc i))) {} (range 20000)))]

 (time (total-hash cs)))

time: avg 26.39 sec

(min 24.18, max 28.42)

time: avg 29.77 sec (12.8% longer)

(min 23.33, max 31.59)

...