Repository navigation
Commit 1faa0a6
committed
HTML API benchmark: add a differential test of parsing behavior between two checkouts.
A performance change must not change what the parser reports. difftrace.php
loads the base and head Tag Processors into one process under renamed
classes and compares the return value, every public accessor and every
_doing_it_wrong() call after every step of six walks: next_token(),
next_tag(), next_tag() visiting closers, next_tag() with queries, with
modifications, and with bookmarks and seeks. For the HTML Processor it
compares a hash of the token stream per input, one process per checkout.
Inputs are the corpus, the synthetic shapes at two sizes, edge cases with
every prefix, and 20,000 mutated corpus slices. Base against itself reports
no differences over 4.6 million steps; dropping "\r" from the whitespace
skipped around "=" or the XMP case from the special-element switch each
produce hundreds of differing inputs.1 parent 1654660 commit 1faa0a6
2 files changed
Lines changed: 728 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
148 | 160 | | |
149 | 161 | | |
150 | 162 | | |
| |||
159 | 171 | | |
160 | 172 | | |
161 | 173 | | |
| 174 | + | |
162 | 175 | | |
163 | 176 | | |
164 | 177 | | |
| |||
0 commit comments