Commit 3688e0fc6596a1a107196d7d5d79d70b89fec212

Martin Mitas 2017-01-01T23:52:27

md_link_label_eq: Remove harmful anti-optimization.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/md4c/md4c.c b/md4c/md4c.c
index 09dfb19..e5d6254 100644
--- a/md4c/md4c.c
+++ b/md4c/md4c.c
@@ -1847,10 +1847,6 @@ md_link_label_eq(const CHAR* a_label, SZ a_size, const CHAR* b_label, SZ b_size)
     OFF a_off;
     OFF b_off;
 
-    /* Fast path: Most real-life reference labels are using exact match. */
-    if(a_size == b_size  &&  memcmp(a_label, b_label, a_size * sizeof(CHAR)) == 0)
-        return TRUE;
-
     /* The slow path, with Unicode case folding and Unicode whitespace collapsing. */
     a_off = md_skip_unicode_whitespace(a_label, 0, a_size);
     b_off = md_skip_unicode_whitespace(b_label, 0, b_size);