Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* src/main/clojure/clojure/core/logic/bench.clj: add another easy one

  • Loading branch information...
commit 77a4f36eb4110d715d4d8ec45e640fbeb41e96f3 1 parent 1fa49b2
David Nolen authored
Showing with 21 additions and 0 deletions.
  1. +21 −0 src/main/clojure/clojure/core/logic/bench.clj
View
21 src/main/clojure/clojure/core/logic/bench.clj
@@ -532,8 +532,22 @@
0 0 2 6 0 9 5 0 0
8 0 0 2 0 3 0 0 9
0 0 5 0 1 0 3 0 0])
+
+ (def easy1
+ [2 0 0 0 8 0 3 0 0
+ 0 6 0 0 7 0 0 8 4
+ 0 3 0 5 0 0 2 0 9
+
+ 0 0 0 1 0 5 4 0 8
+ 0 0 0 0 0 0 0 0 0
+ 4 0 2 7 0 6 0 0 0
+
+ 3 0 1 0 0 7 0 4 0
+ 7 2 0 0 4 0 0 6 0
+ 0 0 4 0 1 0 0 0 3])
(sudokufd easy0)
+ (sudokufd easy1)
(-> (sudokufd easy0) first verify)
@@ -544,6 +558,13 @@
(dotimes [_ 100]
(sudokufd easy0))))
+ ;; ~700ms
+ ;; 7ms for 1
+ (dotimes [_ 5]
+ (time
+ (dotimes [_ 100]
+ (sudokufd easy1))))
+
;; Hardest Norvig Random
(def hard0
[0 0 0 0 0 6 0 0 0
Please sign in to comment.
Something went wrong with that request. Please try again.