ma
marcoroth
GitHub
herb
Workspace
GitHub
CI Pipeline Executions
Filtered
Runs
Demo
Insights
Compare tasks
Analytics
Sign in
Toggle sidebar
Overview
⌘K
herb
Loading workspace stats
Loading workspace insights...
Statistics interval
7 days
30 days
Latest CI Pipeline Executions
Status
Fix filter
Filter
Fuzzy
Filter range
Sort by
Sort by
Start time
Sort ascending
Sort descending
Succeeded
partial-index-discovery
e95c3f19 Engine: Use `String#match?` for the remaining compiler regexp guards (#2250) Follow up on #2235, which switched the boolean guards in `trailing_whitespace?`, `leading_whitespace?` and `at_line_start?` from `=~` to `String#match?`. That pull request deliberately left the other `=~` calls alone, on the grounds that they consume `Regexp.last_match`. That is true for `extract_leading_space`, but four more call sites are also pure boolean guards that never read `$~`, in `extract_and_remove_leading_space!` and `remove_trailing_whitespace_from_last_token!`. After this change the only remaining `=~` in the compiler is the one in `extract_leading_space`, which genuinely consumes `Regexp.last_match(1)`. #### Benchmark Compiling `marcoroth/herb-corpus` of 36,284 templates with `Herb::Engine` on Ruby 4.0.2, counting `GC.stat(:total_allocated_objects)`: | | objects allocated | |---|---| | `=~` | 84,704,561 | | `match?` | 84,535,243 | That is about **−0.20%**, roughly 169,000 fewer objects per full-corpus compile. Repeating both sides put the delta at 169,318 and 169,235, so the measurement is stable well inside the effect. Noticeably smaller than the −0.7% in #2235, which is expected. These two methods only run on explicit trim markers and line-start handling rather than once per token, so they fire far less often. /cc @joelhawksley
by Marco Roth
M
Failed
partial-index-discovery
4dba3c44 Analysis: Fix CI and bring the Ruby check output closer to parity
by Marco Roth
M
Failed
partial-index-discovery
af7bc102 Analysis: Scan every statement in a Ruby file for render references
by Marco Roth
M
Failed
partial-index-discovery
40b6955d Analysis: Follow renders out of prefix-matched partials when finding unused
by Marco Roth
M
Failed
partial-index-discovery
fba2df46 Analysis: Bring the Ruby check output back to parity
by Marco Roth
M
Failed
partial-index-discovery
d79b06aa Analysis: Only treat path-like names as dynamic renders
by Marco Roth
M
Failed
partial-index-discovery
42949ea7 Analysis: Update viewRoot consumers outside the analysis package
by Marco Roth
M
Failed
partial-index-discovery
211ba4f4 Analysis: Resolve template variants
by Marco Roth
M
Failed
partial-index-discovery
514b3c44 Analysis: Resolve conditional renders whose branches are literals
by Marco Roth
M
Failed
partial-index-discovery
60554995 Analysis: Resolve partial names that spell out the extension
by Marco Roth
M
Previous
Next