Skip to content

Commit 6b947db

Browse files
authored
Add isascii to normalize_identifier for 25% reduction in parse time (#228)
1 parent bd19475 commit 6b947db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/literal_parsing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,5 +353,5 @@ end
353353

354354
function normalize_identifier(str)
355355
flags = Base.Unicode.UTF8PROC_STABLE | Base.Unicode.UTF8PROC_COMPOSE
356-
utf8proc_map(str, flags)
356+
return isascii(str) ? str : utf8proc_map(str, flags)
357357
end

0 commit comments

Comments
 (0)