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:
parent
1a3fa2d88b
commit
515594c667
2 changed files with 69 additions and 0 deletions
|
@ -134,4 +134,7 @@ private:
|
|||
FunctionKind m_kind : 3 { FunctionKind::Normal };
|
||||
};
|
||||
|
||||
template<>
|
||||
inline bool Object::fast_is<ECMAScriptFunctionObject>() const { return is_ecmascript_function_object(); }
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue