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.  All times are elapsed times.  "meas" means raw measurements of elapsed time, listed in ascending order so you can easily see min and max.  "avg" is the average of multiple elapsed times.

Problem

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

Using Mark Engelberg's 2013-11-18 proposed hashUsing Murmur3 hash
Paul Butcher's N-queens problem with 6x6 board

Elapsed time: 6.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.9 solutions per hash value (max 2,492)

Elapsed time: 12.2 sec

180,568 solutions hash to 180,566 distinct hash values

average of 1.0 solutions per hash value (max 2)

Elapsed time: 11.8 sec

180,568 solutions hash to 180,567 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.4 min

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

average of 1.0 solutions per hash value (max 4)

Elapsed time: 12.0 min

20,136,752 solutions hash to 20,089,390 distinct hash values

average of 1.00 solutions per hash value (max 3)

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

Elapsed time: avg 20.1 sec

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

Elapsed time: avg 20.0 sec

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

Elapsed time: avg 21.4 sec (6.5% longer)

raw measurements, ascendingmeas: 21.3, 21.4, 21.4, 21.4 21.6

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

Elapsed time: avg 48.0 sec

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

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

average of 1.06 values per hash value

Elapsed time: avg 48.0 sec

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

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

average of 1.05 values per hash value

Elapsed time: avg 48.7 sec (1.5% longer)

raw measurements, ascendingmeas: 47.8, 48.5, 48.9 49.1 49.3

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

(time (hash-range-n 1000000000))

See here for definition of hash-range-n

time: avg 29.8 sec

raw measurements, ascendingmeas: 29.6, 29.6, 29.9, 30.0, 30.1

time: avg 38.7 sec (30% longer)

raw measurements, ascendingmeas: 38.6, 38.6, 38.7, 38.7, 38.7

Verified that hash values of first 500 million integers (those in (range 500000000)) are all different.

time: avg 30.2 sec (1.3% longer)

raw measurements, ascendingmeas: 29.9, 30.2, 30.2, 30.2, 30.2

Calc hashes of 30,001 vectors [] [0] [0 1], etc. up to [0 1 ... 29999] and return sum, using

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

  (time (total-hash cs)))

See here for definition of total-hash

time: avg 10.7 sec

raw measurements, ascendingmeas: 10.6, 10.6, 10.7, 10.7, 10.7

30,000 unique hash values, avg 1.00, max 2

time: avg 10.8 sec (pretty much same)

raw measurements, ascendingmeas: 10.5, 10.7, 10.7, 10.7, 11.6

30,000 unique hash values, avg 1.00, max 2

time: avg 11.4 sec (6.5% longer)

raw measurements, ascendingmeas: 11.3, 11.3, 11.4, 11.4, 11.4

All 30,001 hash values unique

Calc hashes of 30,001 sets #{} #{0} #{0 1}, etc. up to #{0 1 ... 29999} and return sum, using

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

  (time (total-hash cs)))

time: avg 70.2 sec

raw measurements, ascendingmeas: 66.4, 69.1, 69.4, 71.3, 74.8

30,000 unique hash values, avg 1.00, max 2

time: avg 71.4 sec (1.7% longer)

raw measurements, ascendingmeas: 70.9, 71.0, 71.2, 72.0, 72.1

29,308 unique hash values, avg 1.02, max 2

time: avg 71.6 sec (2.0% longer)

raw measurements, ascendingmeas: 67.9, 72.0, 72.5, 72.7, 73.1

All 30,001 hash values unique

Calc hashes of 30,001 maps {} {0 1} {0 1, 1 2} ... up to {0 1, 1 2, ..., 29999 30000} and return sum, using

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

 (time (total-hash cs)))

time: avg 71.7 sec

raw measurements, ascendingmeas: 68.4, 69.0, 69.1, 75.7, 76.3

All 30,001 hash values unique

time: avg 78.5 sec (9.5% longer)

raw measurements, ascendingmeas: 74.1, 75.0, 77.0, 81.2, 85.4

All 30,001 hash values unique

time: avg 89.3 sec (24.5% longer)

raw measurements, ascendingmeas: 83.9, 87.8, 89.8, 91.2, 93.7

All 30,001 hash values unique

...