Commit e06b3fb
committed
Improve text parse performance
If there are many ">"s in text, parsing is very slow.
Calculating -------------------------------------
rexml 3.2.6 master 3.2.6(YJIT) master(YJIT)
attribute 1.116 3.618k 1.117 1.941k i/s - 10.000 times in 8.957748s 0.002764s 8.951665s 0.005152s
text 27.089 2.262k 42.632 1.033k i/s - 10.000 times in 0.369147s 0.004421s 0.234566s 0.009683s
Comparison:
attribute
master: 3617.6 i/s
master(YJIT): 1941.1 i/s - 1.86x slower
3.2.6(YJIT): 1.1 i/s - 3238.31x slower
rexml 3.2.6: 1.1 i/s - 3240.51x slower
text
master: 2261.8 i/s
master(YJIT): 1032.7 i/s - 2.19x slower
3.2.6(YJIT): 42.6 i/s - 53.05x slower
rexml 3.2.6: 27.1 i/s - 83.49x slower1 parent dab8065 commit e06b3fb
3 files changed
+52
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
376 | 380 | | |
377 | 381 | | |
378 | 382 | | |
| |||
438 | 442 | | |
439 | 443 | | |
440 | 444 | | |
441 | | - | |
442 | | - | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
443 | 449 | | |
444 | 450 | | |
445 | 451 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
200 | 204 | | |
201 | 205 | | |
202 | 206 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | 207 | | |
207 | 208 | | |
208 | 209 | | |
| |||
0 commit comments