Skip to content

chore(bench): add benchmark-ips conversion benchmark - #49

Closed
mscrivo wants to merge 1 commit into
masterfrom
chore/benchmark-ips
Closed

mscrivo wants to merge 1 commit into
masterfrom
chore/benchmark-ips

Conversation

@mscrivo

@mscrivo mscrivo commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Adds bench/convert.rb (run with bundle exec ruby bench/convert.rb) and benchmark-ips as a dev dependency.

It benchmarks converting every spec example, plus 2000 sibling divs, the quadratic case #45 fixes. Results on master vs #45 merged locally:

master with #45
all spec examples 168.6 ms/i 156.6 ms/i (within noise)
2000 sibling divs 48.7 ms/i 7.2 ms/i (6.8× faster)

Scaling check across input shapes at 1k/2k/4k elements: only sibling divs was superlinear (~4× per doubling); #45 makes it linear. Paragraphs, links, tables, <br> and nested divs all scale linearly.

🤖 Generated with Claude Code

Benchmarks all spec examples plus 2000 sibling divs, the quadratic
case fixed by #45.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mscrivo mscrivo closed this Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant