Wikunia / ConstraintSolver.jl

ConstraintSolver in Julia: Blog posts ->
https://opensourc.es/blog/constraint-solver-1
MIT License
135 stars 13 forks source link

Refactoring #178

Closed Wikunia closed 3 years ago

Wikunia commented 4 years ago
codecov[bot] commented 4 years ago

Codecov Report

Merging #178 into master will decrease coverage by 1.78%. The diff coverage is 99.64%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #178      +/-   ##
==========================================
- Coverage   98.50%   96.71%   -1.79%     
==========================================
  Files          34       33       -1     
  Lines        2943     2833     -110     
==========================================
- Hits         2899     2740     -159     
- Misses         44       93      +49     
Flag Coverage Δ
#unittests 96.71% <99.64%> (-1.79%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/constraints/all_different/bipartite.jl 100.00% <ø> (ø)
src/tablelogger.jl 96.93% <ø> (ø)
src/types.jl 100.00% <ø> (ø)
src/constraints/equal_to.jl 93.44% <95.45%> (ø)
src/ConstraintSolver.jl 98.91% <100.00%> (-0.50%) :arrow_down:
src/MOI_wrapper/constraints.jl 100.00% <100.00%> (ø)
src/MOI_wrapper/reified.jl 95.45% <100.00%> (ø)
src/MOI_wrapper/variables.jl 99.45% <100.00%> (ø)
src/Variable.jl 95.83% <100.00%> (-1.05%) :arrow_down:
src/branching.jl 100.00% <100.00%> (ø)
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3123cb4...180c794. Read the comment docs.

Wikunia commented 4 years ago

Just a current status update: Immutable seems to be slower (maybe I should update it differently) or think about a completely different structure. Besides that the hashes probably changed such that benchmark comparison is not optimal but it seems that it is weird anyway. Maybe get information on which constraint types are called how often to get a better feeling. But I'll see tmr

Wikunia commented 4 years ago

Benchmark Report for ConstraintSolver

Job Properties

Results

A ratio greater than 1.0 denotes a possible regression (marked with :x:), while a ratio less than 1.0 denotes a possible improvement (marked with :white_check_mark:). Only significant results - results that indicate possible regressions or improvements - are shown below (thus, an empty table means that all benchmark results remained invariant between builds).

ID time ratio memory ratio
["eternity", "5x5_all"] 0.95 (5%) :white_check_mark: 1.00 (1%)
["eternity", "5x5_opt"] 0.93 (5%) :white_check_mark: 1.00 (1%)
["eternity", "6x5"] 0.95 (5%) :white_check_mark: 1.00 (1%)
["graph_coloring", "US_50colors"] 0.94 (5%) :white_check_mark: 1.00 (1%)
["graph_coloring", "US_50colors+equal"] 0.92 (5%) :white_check_mark: 1.00 (1%)
["killer_sudoku", "niall_5500_special"] 1.12 (5%) :x: 1.00 (1%)
["killer_sudoku", "niall_5501"] 1.09 (5%) :x: 1.00 (1%)
["sudoku", "top95_21"] 0.93 (5%) :white_check_mark: 1.00 (1%)
["sudoku", "top95_31"] 0.92 (5%) :white_check_mark: 1.00 (1%)
["sudoku", "top95_36"] 0.95 (5%) :white_check_mark: 1.00 (1%)
["sudoku", "top95_46"] 0.93 (5%) :white_check_mark: 1.00 (1%)
["sudoku", "top95_56"] 0.94 (5%) :white_check_mark: 1.00 (1%)
["sudoku", "top95_6"] 0.91 (5%) :white_check_mark: 1.00 (1%)
["sudoku", "top95_71"] 0.94 (5%) :white_check_mark: 1.00 (1%)
["sudoku", "top95_86"] 0.94 (5%) :white_check_mark: 1.00 (1%)

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

Julia versioninfo

Target

Julia Version 1.4.2
Commit 44fa15b150* (2020-05-23 18:35 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      "Arch Linux"
  uname: Linux 5.7.8-arch1-1 #1 SMP PREEMPT Thu, 09 Jul 2020 16:34:01 +0000 x86_64 unknown
  CPU: Intel(R) Xeon(R) CPU E5-1650 0 @ 3.20GHz: 
                 speed         user         nice          sys         idle          irq
       #1-12  3017 MHz    3454155 s       7416 s     551241 s   20447948 s      59975 s

  Memory: 46.99065017700195 GB (36480.37890625 MB free)
  Uptime: 20560.0 sec
  Load Avg:  3.83203125  3.224609375  2.662109375
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, sandybridge)

Baseline

Julia Version 1.4.2
Commit 44fa15b150* (2020-05-23 18:35 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      "Arch Linux"
  uname: Linux 5.7.8-arch1-1 #1 SMP PREEMPT Thu, 09 Jul 2020 16:34:01 +0000 x86_64 unknown
  CPU: Intel(R) Xeon(R) CPU E5-1650 0 @ 3.20GHz: 
                 speed         user         nice          sys         idle          irq
       #1-12  3023 MHz    3650007 s       7452 s     574234 s   21084850 s      62175 s

  Memory: 46.99065017700195 GB (37805.96484375 MB free)
  Uptime: 21278.0 sec
  Load Avg:  3.00390625  3.22314453125  2.96337890625
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, sandybridge)
Wikunia commented 3 years ago

Benchmark Report for ConstraintSolver

Job Properties

Results

A ratio greater than 1.0 denotes a possible regression (marked with :x:), while a ratio less than 1.0 denotes a possible improvement (marked with :white_check_mark:). Only significant results - results that indicate possible regressions or improvements - are shown below (thus, an empty table means that all benchmark results remained invariant between builds).

ID time ratio memory ratio
["graph_coloring", "US_50colors"] 0.94 (5%) :white_check_mark: 1.00 (1%)
["graph_coloring", "US_50colors+equal"] 0.94 (5%) :white_check_mark: 1.00 (1%)
["graph_coloring", "US_8+equal"] 0.94 (5%) :white_check_mark: 1.00 (1%)
["killer_sudoku", "niall_5500_special"] 0.95 (5%) :white_check_mark: 1.00 (1%)
["sudoku", "top95_1"] 0.95 (5%) :white_check_mark: 1.00 (1%)
["sudoku", "top95_26"] 0.95 (5%) :white_check_mark: 1.00 (1%)
["sudoku", "top95_36"] 0.95 (5%) :white_check_mark: 1.00 (1%)
["sudoku", "top95_41"] 0.95 (5%) :white_check_mark: 1.00 (1%)
["sudoku", "top95_6"] 0.95 (5%) :white_check_mark: 1.00 (1%)
["sudoku", "top95_66"] 0.95 (5%) :white_check_mark: 1.00 (1%)

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

Julia versioninfo

Target

Julia Version 1.5.0
Commit 96786e22cc (2020-08-01 23:44 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      "Arch Linux"
  uname: Linux 5.7.11-arch1-1 #1 SMP PREEMPT Wed, 29 Jul 2020 21:38:21 +0000 x86_64 unknown
  CPU: Intel(R) Xeon(R) CPU E5-1650 0 @ 3.20GHz: 
                 speed         user         nice          sys         idle          irq
       #1-12  1612 MHz      87768 s          0 s       7484 s    2473257 s        399 s

  Memory: 46.99065017700195 GB (46168.9921875 MB free)
  Uptime: 2142.0 sec
  Load Avg:  1.0703125  1.01318359375  0.70361328125
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, sandybridge)

Baseline

Julia Version 1.5.0
Commit 96786e22cc (2020-08-01 23:44 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      "Arch Linux"
  uname: Linux 5.7.11-arch1-1 #1 SMP PREEMPT Wed, 29 Jul 2020 21:38:21 +0000 x86_64 unknown
  CPU: Intel(R) Xeon(R) CPU E5-1650 0 @ 3.20GHz: 
                 speed         user         nice          sys         idle          irq
       #1-12  1653 MHz     151449 s          0 s       9638 s    3188417 s        547 s

  Memory: 46.99065017700195 GB (46076.328125 MB free)
  Uptime: 2793.0 sec
  Load Avg:  1.21240234375  1.12744140625  0.9443359375
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, sandybridge)
Wikunia commented 3 years ago

Benchmark Report for ConstraintSolver

Job Properties

Results

A ratio greater than 1.0 denotes a possible regression (marked with :x:), while a ratio less than 1.0 denotes a possible improvement (marked with :white_check_mark:). Only significant results - results that indicate possible regressions or improvements - are shown below (thus, an empty table means that all benchmark results remained invariant between builds).

ID time ratio memory ratio
["graph_coloring", "US_50colors"] 0.94 (5%) :white_check_mark: 1.00 (1%)
["graph_coloring", "US_50colors+equal"] 0.94 (5%) :white_check_mark: 1.00 (1%)
["graph_coloring", "US_8+equal"] 0.94 (5%) :white_check_mark: 1.00 (1%)
["killer_sudoku", "niall_5500_special"] 0.93 (5%) :white_check_mark: 1.00 (1%)

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

Julia versioninfo

Target

Julia Version 1.5.0
Commit 96786e22cc (2020-08-01 23:44 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      "Arch Linux"
  uname: Linux 5.7.11-arch1-1 #1 SMP PREEMPT Wed, 29 Jul 2020 21:38:21 +0000 x86_64 unknown
  CPU: Intel(R) Xeon(R) CPU E5-1650 0 @ 3.20GHz: 
                 speed         user         nice          sys         idle          irq
       #1-12  1632 MHz     198180 s         41 s       8019 s    2528668 s        519 s

  Memory: 46.99065017700195 GB (46248.87109375 MB free)
  Uptime: 2279.0 sec
  Load Avg:  1.02978515625  1.0400390625  0.96484375
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, sandybridge)

Baseline

Julia Version 1.5.0
Commit 96786e22cc (2020-08-01 23:44 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      "Arch Linux"
  uname: Linux 5.7.11-arch1-1 #1 SMP PREEMPT Wed, 29 Jul 2020 21:38:21 +0000 x86_64 unknown
  CPU: Intel(R) Xeon(R) CPU E5-1650 0 @ 3.20GHz: 
                 speed         user         nice          sys         idle          irq
       #1-12  1764 MHz     261885 s         41 s      10362 s    3239538 s        666 s

  Memory: 46.99065017700195 GB (46239.8046875 MB free)
  Uptime: 2927.0 sec
  Load Avg:  1.02197265625  1.0439453125  1.0
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, sandybridge)
Wikunia commented 3 years ago

This is finally going to get merged @kdheepak :) Took a while.

Wikunia commented 3 years ago

Okay tried some stuff out but I think using Val makes it easier to add a branching strategy from the outside.

kdheepak commented 3 years ago

Exciting stuff! Looking forward to taking a closer look at it.