From 80b065f757240af7920862b3e09f32a6dc06d392 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Fri, 4 Oct 2024 12:01:41 +0200 Subject: Table-based transformations (will revert immediately) This commit changes transformations to being based on a lookup table intead of a big switch. This is something I had planned for a long time and the code is nicer with this change. But unfortunately the performance is noticeably worse, so I'll revert all these changes in the next commit. I wanted to push this anyway so we can keep track of this. --- src/core/io_cube.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/io_cube.h') diff --git a/src/core/io_cube.h b/src/core/io_cube.h index 9ae82d7..58b332c 100644 --- a/src/core/io_cube.h +++ b/src/core/io_cube.h @@ -143,7 +143,7 @@ readcube_B32(const char *buf) "Error reading B32 edge %d (char %d)\n", i, i+9); } - return cubefromarray(c, e); + return cubefromarray_ce(c, e); } STATIC cube_t @@ -178,7 +178,7 @@ readcube_H48(const char *buf) c[i] = piece | orient; } - return cubefromarray(c, e); + return cubefromarray_ce(c, e); } STATIC uint8_t @@ -210,7 +210,7 @@ readcube_LST(const char *buf) for (i = 0; i < 12; i++) e[i] = readpiece_LST(&buf); - return cubefromarray(c, e); + return cubefromarray_ce(c, e); } STATIC int -- cgit v1.3