1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00

LibJS: Add fast_is<T>() for things that were hot in RTTI

This gives a ~4% speedup when parsing the largest Discord JS file.
This commit is contained in:
Andreas Kling 2022-02-13 13:07:38 +01:00
parent 1a3fa2d88b
commit 515594c667
2 changed files with 69 additions and 0 deletions

View file

@ -134,4 +134,7 @@ private:
FunctionKind m_kind : 3 { FunctionKind::Normal };
};
template<>
inline bool Object::fast_is<ECMAScriptFunctionObject>() const { return is_ecmascript_function_object(); }
}