diff --git a/llvmlite/__module.vp b/llvmlite/__module.vp index ffc4ab0..943da30 100644 --- a/llvmlite/__module.vp +++ b/llvmlite/__module.vp @@ -182,7 +182,8 @@ class LLVMModule: if cur.Ty is not None: existing_name: str = get_struct_name(cur.Ty) if existing_name is not None: - if string.strcmp(existing_name, name) == 0: + # 快速路径:strcmp 判等蕴含首字符相等,首字符不同者跳过 strcmp。 + if existing_name[0] == name[0] and string.strcmp(existing_name, name) == 0: return 1 cur = cur.Next return 0