Repository navigation
Comparing changes
Open a pull request
base repository: Handlebars-Net/Handlebars.Net
base: 2.4.2
head repository: Handlebars-Net/Handlebars.Net
compare: 2.4.3
- 11 commits
- 16 files changed
- 2 contributors
Commits on Aug 9, 2026
-
perf: retain up to 32K chars in pooled ReusableStringWriter
Outputs larger than 4096 chars caused the pooled writer to be discarded on every render, so each render re-grew a fresh StringBuilder(16) chunk by chunk. RenderToString: -56% allocations (30.9KB -> 13.4KB), ~-8% time (clean). Co-Authored-By: Claude Fable 5 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1fd974b - Browse repository at this point
Copy the full SHA 1fd974bView commit details -
perf: skip ConditionalWeakTable probe in SafeStrings until first Mark
Every string written to output paid a CWT lookup even when the application never produces safe-marked strings (no return-helpers/subexpressions). Co-Authored-By: Claude Fable 5 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3ddfc28 - Browse repository at this point
Copy the full SHA 3ddfc28View commit details -
perf: read ThrowOnUnresolvedBindingExpression only on the unresolved …
…branch Avoids two dispatched configuration property reads per path resolve. Co-Authored-By: Claude Fable 5 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1e1b676 - Browse repository at this point
Copy the full SHA 1e1b676View commit details -
perf: cheaper falsy checks - typed zero tests, O(1) ICollection empti…
…ness Replaces the IsNumber isinst cascade + Convert.ToBoolean IConvertible dispatch with a typed switch, adds an ICollection.Count fast path to IsFalsyOrEmpty (avoids boxing struct enumerators), and disposes the enumerator in Any(). RenderSimple dictionary/expando: ~-6%. Co-Authored-By: Claude Fable 5 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 31c1e39 - Browse repository at this point
Copy the full SHA 31c1e39View commit details -
perf: skip frame-helper cascade walk in late-bind descriptors when no…
… frame helpers exist BindingContext now tracks whether any frame in the ancestry ever exposed its helper registries for writing (decorators / in-render registration). Until then, LateBind(Block)HelperDescriptor skips the per-invocation cascade lookup that every simple {{name}} pays per render. Co-Authored-By: Claude Fable 5 <[email protected]>Configuration menu - View commit details
-
Copy full SHA for 395d9e9 - Browse repository at this point
Copy the full SHA 395d9e9View commit details -
perf: cache helper-resolver presence in late-bind descriptors
ObservableList.Count acquires a ReaderWriterLockSlim on every call, and the late-bind descriptors checked it once per {{name}} per render. The descriptors now subscribe to the append-only resolver list once and keep a volatile flag, eliminating the per-invocation lock acquisition. Co-Authored-By: Claude Fable 5 <[email protected]>Configuration menu - View commit details
-
Copy full SHA for e938d96 - Browse repository at this point
Copy the full SHA e938d96View commit details -
perf: monomorphic descriptor cache on ChainSegment for member access
TryAccessMember resolved the instance's ObjectDescriptor through the ambient context + type-keyed lookup on every dotted-segment access per render. Each ChainSegment now keeps an immutable (factory, version, type) -> descriptor entry; ObjectDescriptorFactory gained a version stamp bumped on provider registration so stale entries self-invalidate. RenderNested -23-35%, RenderSimple object -32%. Co-Authored-By: Claude Fable 5 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3c0a98d - Browse repository at this point
Copy the full SHA 3c0a98dView commit details -
Merge pull request #667 from Handlebars-Net/perf/render-improvements
perf: render-path optimizations (-21-36% render time, -50% allocations)
Configuration menu - View commit details
-
Copy full SHA for 7f4e827 - Browse repository at this point
Copy the full SHA 7f4e827View commit details -
perf: keep template JIT thin - NoInlining entry points for statement …
…writes and helper-literal dispatch Dynamic methods are JIT-compiled at CreateDelegate, and the JIT honored AggressiveInlining on EncodedTextWriter.Write<object> and the helper options/context/arguments construction, inline-expanding that machinery into every mustache call site of every compiled template. Emit thin NoInlining static entry points instead (JIT-compiled once per process): - EncodedTextWriter.WriteObjectTo for {{expr}} statement writes - CompiledHelperInvokers.WriteInvoke/Invoke for zero-argument helper literals Compilation: 10.80 -> 1.75 ms (-84%). CompileMany: N=10 57.7 -> 5.8 ms, N=100 537.9 -> 69.4 ms (-87-90%). Probe: 40-statement dotted-path template 13.1 -> 1.5 ms/compile. Co-Authored-By: Claude Fable 5 <[email protected]>Configuration menu - View commit details
-
Copy full SHA for 2ccbb62 - Browse repository at this point
Copy the full SHA 2ccbb62View commit details -
perf: keep helper-literal statement dispatch inline; drop unused invoker
The NoInlining entry point for zero-argument helper-literal statements ({{name}}) saved compile time but cost ~2ns per value per render on the hottest render shape (RenderToString clean +4%). The interface dispatch in that route cannot be inline-expanded by the JIT anyway, so its compile cost is moderate; keep it inline and retain the NoInlining entry points only where they are render-neutral (WriteObjectTo, path-expression Invoke). Render guardrail after this: RenderToString clean/html within noise of the render branch; Compilation 1.85ms (-83% vs 10.80ms), CompileMany N=100 78.1ms (-85% vs 537.9ms). Co-Authored-By: Claude Fable 5 <[email protected]>Configuration menu - View commit details
-
Copy full SHA for 9e39b87 - Browse repository at this point
Copy the full SHA 9e39b87View commit details -
Merge pull request #668 from Handlebars-Net/perf/compile-experiments
perf: 83-88% faster template compilation via NoInlining JIT entry points
Configuration menu - View commit details
-
Copy full SHA for c9a20a2 - Browse repository at this point
Copy the full SHA c9a20a2View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 2.4.2...2.4.3