You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Separate follow up to #1589 . Looking at the generate code for the following grammar:
type K = unit {
x: skip bytes &size=1;
};
type L = unit {
k: K;
};
type M = unit {
l: L;
};
public type N = unit {
: M[] &eod;
};
There's a number of indent() and dedent() calls generated involving std::string instances being constructed at runtime. These are pretty short strings so they shouldn't involve an allocation and might be optimized well, but might still be sensible to not even construct them.
Unfortunately I don't have the means to provide before-after here.
I used the approach from #1593 and #1592 simply commenting out the debug::dedent and debug::indent calls in the generated code and then re-building. Removes ~10% of runtime for that particular reproducer.
Separate follow up to #1589 . Looking at the generate code for the following grammar:
There's a number of
indent()
anddedent()
calls generated involvingstd::string
instances being constructed at runtime. These are pretty short strings so they shouldn't involve an allocation and might be optimized well, but might still be sensible to not even construct them.A flamegraph indicates ~3.3% samples falling into basic_string functions.
Unfortunately I don't have the means to provide before-after here.
The text was updated successfully, but these errors were encountered: