Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Handlebars-Net/Handlebars.Net
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.4.2
Choose a base ref
...
head repository: Handlebars-Net/Handlebars.Net
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2.4.3
Choose a head ref
  • 11 commits
  • 16 files changed
  • 2 contributors

Commits on Aug 9, 2026

  1. 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]>
    rexm and claude committed Aug 9, 2026
    Configuration menu
    Copy the full SHA
    1fd974b View commit details
    Browse the repository at this point in the history
  2. 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]>
    rexm and claude committed Aug 9, 2026
    Configuration menu
    Copy the full SHA
    3ddfc28 View commit details
    Browse the repository at this point in the history
  3. 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]>
    rexm and claude committed Aug 9, 2026
    Configuration menu
    Copy the full SHA
    1e1b676 View commit details
    Browse the repository at this point in the history
  4. 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]>
    rexm and claude committed Aug 9, 2026
    Configuration menu
    Copy the full SHA
    31c1e39 View commit details
    Browse the repository at this point in the history
  5. 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]>
    rexm and claude committed Aug 9, 2026
    Configuration menu
    Copy the full SHA
    395d9e9 View commit details
    Browse the repository at this point in the history
  6. 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]>
    rexm and claude committed Aug 9, 2026
    Configuration menu
    Copy the full SHA
    e938d96 View commit details
    Browse the repository at this point in the history
  7. 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]>
    rexm and claude committed Aug 9, 2026
    Configuration menu
    Copy the full SHA
    3c0a98d View commit details
    Browse the repository at this point in the history
  8. Merge pull request #667 from Handlebars-Net/perf/render-improvements

    perf: render-path optimizations (-21-36% render time, -50% allocations)
    rexm authored Aug 9, 2026
    Configuration menu
    Copy the full SHA
    7f4e827 View commit details
    Browse the repository at this point in the history
  9. 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]>
    rexm and claude committed Aug 9, 2026
    Configuration menu
    Copy the full SHA
    2ccbb62 View commit details
    Browse the repository at this point in the history
  10. 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]>
    rexm and claude committed Aug 9, 2026
    Configuration menu
    Copy the full SHA
    9e39b87 View commit details
    Browse the repository at this point in the history
  11. Merge pull request #668 from Handlebars-Net/perf/compile-experiments

    perf: 83-88% faster template compilation via NoInlining JIT entry points
    rexm authored Aug 9, 2026
    Configuration menu
    Copy the full SHA
    c9a20a2 View commit details
    Browse the repository at this point in the history
Loading