aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: fb941c8373796766e6985928213a10912a9462f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Prototype for a new optimal solver

Work in progress.

## Running tests

```
$ ./configure.sh # Run 'TYPE=AVX2 ./configure.sh' to use AVX2 instead
$ make test
```

## TODO:

### Tests

* inverse_move
* inverse_trans

### Simple additions

* Write to AVX2-src format
* move() that takes a string (alg) as input

### Changes

* write one function (static inline or public?) for each move (and trans)
* only call the specific functions in performance-critical steps (i.e. solve
  - if the functions are static inline, all performance-critical steps must
  be internal to cube.c)
* this also enables skipping some unnecessary work (e.g. flip edges, twist
  corners) for many moves (and mirror transformations)
* add benchmarks with moves / trans called directly instead of via the
  generic function
* keep generic move and trans functions with big switch case
* bring back constants into cube.c, and maybe also moves (TBD: what to
  do with architecture-specific code? leave in separate files like now,
  use just one file for each architecture...)

### Documentation and interface

* remove the constant #define's from cube.h (write a comment instead)
* reconsider content of cube.h, remove some stuff
* remove doc folder, inline documentation as comments in cube.h or cube.c

### AVX2

* fix base get_ and set_ macros (constant arguments?)
* implement missing stuff (moves, transform)
* optimize things that use get_ and set_

### More features

* coordinates: co, eo, epsep, cpsep_sym, cocpsep_sym, cphtr_sym, cocphtr_sym
* pruning tables (1 bit per entry + fallback)
* solve.c

### Optimizations:

* multi-move (up to 4/5 moves at once)

### Things I need to learn:

* Use AVX2 instructions, in particular
  [_mm256_shuffle_epi8](https://www.intel.com/content/www/us/en/docs/cpp-compiler/developer-guide-reference/2021-10/mm256-shuffle-epi8.html))
* Inspect compiled assembly
* Use valgrind tool cachegrind and other profiling tools

Generated with cgit - Back to sebastiano.tronto.net