Wikunia / ConstraintSolver.jl

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

removed impl and use dispatch instead #273

Closed Wikunia closed 2 years ago

Wikunia commented 2 years ago

Removed all the impl functions and struct fields. Instead it uses multiple dispatch to have basically defaults for all of them.

codecov[bot] commented 2 years ago

Codecov Report

Merging #273 (80ee7d8) into master (9830f7d) will increase coverage by 0.04%. The diff coverage is 97.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #273      +/-   ##
==========================================
+ Coverage   97.59%   97.64%   +0.04%     
==========================================
  Files          53       53              
  Lines        4458     4376      -82     
==========================================
- Hits         4351     4273      -78     
+ Misses        107      103       -4     
Impacted Files Coverage Δ
src/ConstraintSolver.jl 99.14% <ø> (-0.01%) :arrow_down:
src/constraints/all_equal.jl 94.89% <0.00%> (-0.98%) :arrow_down:
src/constraints/table.jl 98.92% <0.00%> (-0.36%) :arrow_down:
src/type_inits.jl 96.07% <ø> (-0.15%) :arrow_down:
src/types.jl 98.98% <ø> (-0.02%) :arrow_down:
src/util.jl 98.33% <ø> (+0.83%) :arrow_up:
src/constraints.jl 100.00% <100.00%> (ø)
src/constraints/activator_constraints.jl 100.00% <100.00%> (+10.20%) :arrow_up:
src/constraints/boolset.jl 100.00% <100.00%> (ø)
src/constraints/indicator.jl 100.00% <100.00%> (ø)
... and 8 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 9830f7d...80ee7d8. Read the comment docs.

Wikunia commented 2 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"] 1.05 (5%) 1.06 (1%) :x:
["eternity", "5x5_opt"] 1.06 (5%) :x: 1.04 (1%) :x:
["eternity", "5x5_opt_ind"] 1.04 (5%) 1.03 (1%) :x:
["eternity", "5x5_opt_rei"] 1.06 (5%) :x: 1.03 (1%) :x:
["eternity", "6x5"] 1.04 (5%) 1.06 (1%) :x:
["eternity", "6x5_ABS"] 1.05 (5%) :x: 1.06 (1%) :x:
["graph_coloring", "US_50colors"] 0.64 (5%) :white_check_mark: 0.81 (1%) :white_check_mark:
["graph_coloring", "US_50colors+equal"] 0.64 (5%) :white_check_mark: 0.79 (1%) :white_check_mark:
["graph_coloring", "US_50colors+equal_ABS"] 1.09 (5%) :x: 1.07 (1%) :x:
["graph_coloring", "US_8+equal"] 0.65 (5%) :white_check_mark: 0.77 (1%) :white_check_mark:
["graph_coloring", "US_8+equal_ABS"] 1.09 (5%) :x: 1.12 (1%) :x:
["graph_coloring", "le450_5d"] 0.85 (5%) :white_check_mark: 0.92 (1%) :white_check_mark:
["graph_coloring", "queen7_7"] 0.67 (5%) :white_check_mark: 0.81 (1%) :white_check_mark:
["killer_sudoku", "niall_5500"] 1.00 (5%) 1.06 (1%) :x:
["killer_sudoku", "niall_5500_ABS"] 1.01 (5%) 1.05 (1%) :x:
["killer_sudoku", "niall_5500_special"] 1.03 (5%) 1.09 (1%) :x:
["killer_sudoku", "niall_5501"] 1.00 (5%) 1.10 (1%) :x:
["killer_sudoku", "niall_5501_ABS"] 1.02 (5%) 1.11 (1%) :x:
["killer_sudoku", "niall_5501_special"] 1.02 (5%) 1.11 (1%) :x:
["lp", "issue_83"] 1.03 (5%) 0.98 (1%) :white_check_mark:
["scheduling", "all_different_except_0_len10"] 0.94 (5%) :white_check_mark: 1.12 (1%) :x:
["scheduling", "all_different_except_0_len12"] 0.96 (5%) 1.14 (1%) :x:
["scheduling", "furniture_moving"] 0.30 (5%) :white_check_mark: 0.49 (1%) :white_check_mark:
["scheduling", "organize_day"] 0.73 (5%) :white_check_mark: 0.75 (1%) :white_check_mark:
["steiner", "steiner_7"] 0.28 (5%) :white_check_mark: 0.52 (1%) :white_check_mark:
["sudoku", "25x25_89"] 1.03 (5%) 1.03 (1%) :x:
["sudoku", "25x25_90"] 0.92 (5%) :white_check_mark: 1.03 (1%) :x:
["sudoku", "top95_1"] 0.79 (5%) :white_check_mark: 0.89 (1%) :white_check_mark:
["sudoku", "top95_11"] 0.87 (5%) :white_check_mark: 0.96 (1%) :white_check_mark:
["sudoku", "top95_16"] 0.85 (5%) :white_check_mark: 0.96 (1%) :white_check_mark:
["sudoku", "top95_21"] 0.79 (5%) :white_check_mark: 0.89 (1%) :white_check_mark:
["sudoku", "top95_26"] 0.78 (5%) :white_check_mark: 0.90 (1%) :white_check_mark:
["sudoku", "top95_31"] 0.96 (5%) 0.96 (1%) :white_check_mark:
["sudoku", "top95_36"] 0.72 (5%) :white_check_mark: 0.89 (1%) :white_check_mark:
["sudoku", "top95_41"] 0.80 (5%) :white_check_mark: 0.92 (1%) :white_check_mark:
["sudoku", "top95_46"] 0.80 (5%) :white_check_mark: 0.91 (1%) :white_check_mark:
["sudoku", "top95_51"] 0.82 (5%) :white_check_mark: 0.93 (1%) :white_check_mark:
["sudoku", "top95_56"] 0.91 (5%) :white_check_mark: 0.96 (1%) :white_check_mark:
["sudoku", "top95_6"] 0.78 (5%) :white_check_mark: 0.89 (1%) :white_check_mark:
["sudoku", "top95_61"] 0.79 (5%) :white_check_mark: 0.92 (1%) :white_check_mark:
["sudoku", "top95_71"] 0.82 (5%) :white_check_mark: 0.91 (1%) :white_check_mark:
["sudoku", "top95_76"] 0.78 (5%) :white_check_mark: 0.91 (1%) :white_check_mark:
["sudoku", "top95_81"] 0.77 (5%) :white_check_mark: 0.90 (1%) :white_check_mark:
["sudoku", "top95_86"] 0.81 (5%) :white_check_mark: 0.92 (1%) :white_check_mark:
["sudoku", "top95_91"] 0.81 (5%) :white_check_mark: 0.94 (1%) :white_check_mark:

Benchmark Group List

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

Julia versioninfo

Target

Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  uname: Linux 5.13.10-arch1-1 #1 SMP PREEMPT Thu, 12 Aug 2021 21:59:14 +0000 x86_64 unknown
  CPU: AMD Ryzen 7 PRO 4750U with Radeon Graphics: 
                 speed         user         nice          sys         idle          irq
       #1-16  1700 MHz     465219 s        350 s     170866 s     959132 s          0 s

  Memory: 38.41938781738281 GB (15956.828125 MB free)
  Uptime: 73804.0 sec
  Load Avg:  1.69  2.0  2.21
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, znver2)

Baseline

Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  uname: Linux 5.13.10-arch1-1 #1 SMP PREEMPT Thu, 12 Aug 2021 21:59:14 +0000 x86_64 unknown
  CPU: AMD Ryzen 7 PRO 4750U with Radeon Graphics: 
                 speed         user         nice          sys         idle          irq
       #1-16  1400 MHz     475148 s        350 s     171859 s    1081930 s          0 s

  Memory: 38.41938781738281 GB (16343.53125 MB free)
  Uptime: 74644.0 sec
  Load Avg:  1.79  1.55  1.85
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, znver2)