aboutsummaryrefslogtreecommitdiff
path: root/doc/h48.md
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--doc/h48.md33
1 files changed, 25 insertions, 8 deletions
diff --git a/doc/h48.md b/doc/h48.md
index d9ef192..694a07d 100644
--- a/doc/h48.md
+++ b/doc/h48.md
@@ -251,15 +251,18 @@ Moreover, as an additional heuristic, in case of a 0 read we also look
251up another pruning value in a table that takes into account only the 251up another pruning value in a table that takes into account only the
252position of the edges. This table is small (around 1MB), so repeated 252position of the edges. This table is small (around 1MB), so repeated
253accesses to it are not too slow. In practice, this gives a small speed up 253accesses to it are not too slow. In practice, this gives a small speed up
254of around 5%. More tables could be used to refine the fallback estimate, 254of around 5% for random scrambles. However, for small solvers (low values
255but each additional table leads to longer lookup times, especially if 255of h) and positions where corners are close to solved, this fallback
256it is too large to fit in cache. 256table gives dramatic improvements (up to a factor of 1000x in some
257manual tests).
257 258
258Previous versions of this implementation (up to commit 6c42463, or 259More tables could be used to refine the fallback estimate, but each
259to version 0.2) also included the possibility of a table with 4 bits 260additional table leads to longer lookup times, especially if it is too
260per entry, at least for the `h0` case. Such tables did not require 261large to fit in cache. Previous versions of this implementation (up
261a fallback lookup, but due to their large size they were not less 262to commit 6c42463, or to version 0.2) also included the possibility of
262efficient. Therefore, they have been removed. 263a table with 4 bits per entry, at least for the `h0` case. Such tables
264did not require a fallback lookup, but due to their large size they were
265not less efficient. Therefore, they have been removed.
263 266
264### Estimation refinements 267### Estimation refinements
265 268
@@ -312,6 +315,20 @@ inverse position*, then the coordinate on the normal position has not
312changed. Thus if we keep track of the last computed pruning value, 315changed. Thus if we keep track of the last computed pruning value,
313we can reuse it and avoid an expensive table lookup. 316we can reuse it and avoid an expensive table lookup.
314 317
318### Pruning pipeline and prefetching
319
320To improve the memory access pattern and exploit
321[prefetching](https://en.wikipedia.org/wiki/Cache_prefetching)
322opportunities, we don't expand each neighbor one by one in the
323pruning phase. Instead, we employ a *pruning pipeline*, where we
324first compute the cube and inverse position for each neighbor, and
325then we proceed through a series of stages, at each of which we
326compute some prune off some nodes and we pre-compute the data
327necessary for the next step.
328
329This pipeline-based strategy gives an speedup of around 25%.
330Adding manual prefetching, we get an additional 20% speedup.
331
315### Other optimizations 332### Other optimizations
316 333
317The H48 solver uses various other optimizations. 334The H48 solver uses various other optimizations.

Generated with cgit - Back to sebastiano.tronto.net