aboutsummaryrefslogtreecommitdiff
path: root/src/table.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/table.rs')
-rw-r--r--src/table.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/table.rs b/src/table.rs
index 9354601..78b89c3 100644
--- a/src/table.rs
+++ b/src/table.rs
@@ -1,4 +1,7 @@
-pub const CRC32_TABLE: [[u32; 256]; 16] = [
+// NOTE: This is static instead of const to ensure that indexing into this table
+// doesn't result in large memmoves when in debug mode, which can significantly
+// impact performance.
+pub static CRC32_TABLE: [[u32; 256]; 16] = [
[
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535,
0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd,