I am uncertain but it appears as though it may also be used in hot spots( parser runtime) in the code and not only in one time initial definitions?
if that is indeed the case I suggest you try avoiding initializing class instances at parser runtime.
Plain objects ({}) if sufficient would be much faster.
Specific boolean conditions.
This is a minor thing but conditions such as:
if (!this.createsAstNode)
Will take longer than a more precise condition:
if (this.createsAstNode === false)
If these kind of conditions appear in enough hot spots in the code base
you may be able to squeeze a a tiny bit of extra performance.
Class instances avoidance
I see much usage of the newkeyword.
I am uncertain but it appears as though it may also be used in hot spots( parser runtime) in the code and not only in one time initial definitions?
if that is indeed the case I suggest you try avoiding initializing class instances at parser runtime. Plain objects ({}) if sufficient would be much faster.
Specific boolean conditions.
This is a minor thing but conditions such as:
Will take longer than a more precise condition:
If these kind of conditions appear in enough hot spots in the code base you may be able to squeeze a a tiny bit of extra performance.