From 92e0378dbd416633013377ace597e1c02ae6bef4 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 13 Feb 2022 13:53:52 +0100 Subject: [PATCH] LibJS: Always inline Lexer::current_code_point() This gives a ~1% speedup when parsing the largest Discord JS file. --- Userland/Libraries/LibJS/Lexer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Lexer.cpp b/Userland/Libraries/LibJS/Lexer.cpp index 43a3952a56..23a8e2de64 100644 --- a/Userland/Libraries/LibJS/Lexer.cpp +++ b/Userland/Libraries/LibJS/Lexer.cpp @@ -358,7 +358,7 @@ ALWAYS_INLINE bool Lexer::is_unicode_character() const return (m_current_char & 128) != 0; } -u32 Lexer::current_code_point() const +ALWAYS_INLINE u32 Lexer::current_code_point() const { static constexpr const u32 REPLACEMENT_CHARACTER = 0xFFFD; if (m_position == 0)