progs/sudoku.scala
changeset 449 d67c5f7177a6
parent 384 6e1237691307
child 450 61eb4f9b8d84
--- a/progs/sudoku.scala	Fri Nov 25 00:03:15 2022 +0000
+++ b/progs/sudoku.scala	Fri Dec 02 07:48:03 2022 +0000
@@ -189,8 +189,6 @@
        "....14....3....2...7..........9...3.6.1.............8.2.....1.4....5.6.....7.8...",
        "4.....8.5.3..........7......2.....6.....8.4......1.......6.3.7.5..2.....1.4......")
 
-//println("108:\n" ++ pretty(hard_games(108).replaceAll("\\.", " ")) ++ "\n")
-//println("109:\n" ++ pretty(hard_games(109).replaceAll("\\.", " ")) ++ "\n")
 
 
 // for measuring time
@@ -203,7 +201,7 @@
 
 
 val total = 
-  (for ((game, i) <- hard_games.zipWithIndex) yield {
+  (for ((game, i) <- hard_games.zipWithIndex.par) yield {
     val secs = time_needed(1, search(game))
     println(f"${i}%2.0f: ${game} |${secs}%2.3f secs")
     secs
@@ -216,7 +214,9 @@
 
 
 // 1 single thread version 800 secs
+//
 // 4 cores parallel version on a moderate laptop 400 secs
 // 8 cores: 290 secs
+// 10 cores: 156 secs
 // 18 cores: 142 secs