Commit 3ad9db3
committed
Optimize ripper bounds
Basically a port of ruby/ruby@c45f781 into ruby
It's quite effective at ~97% hit rate for me.
Speeds it up from ~6.77x slower to only 4.07x slower.
For the lexer `on_sp` it also gives a bit of an improvement:
1.04x slower to 1.10x faster
I guess the class may be universally useful but for now I just made it nodoc.1 parent ceb4699 commit 3ad9db3
7 files changed
Lines changed: 91 additions & 15 deletions
File tree
- lib/prism
- translation
- rbi/generated/prism
- sig/generated/prism
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
| |||
837 | 843 | | |
838 | 844 | | |
839 | 845 | | |
| 846 | + | |
| 847 | + | |
840 | 848 | | |
841 | 849 | | |
842 | 850 | | |
| |||
851 | 859 | | |
852 | 860 | | |
853 | 861 | | |
854 | | - | |
855 | | - | |
| 862 | + | |
856 | 863 | | |
857 | 864 | | |
858 | 865 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
227 | | - | |
228 | | - | |
| 226 | + | |
229 | 227 | | |
230 | 228 | | |
231 | 229 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
449 | 507 | | |
450 | 508 | | |
451 | 509 | | |
| |||
489 | 547 | | |
490 | 548 | | |
491 | 549 | | |
| 550 | + | |
492 | 551 | | |
493 | 552 | | |
494 | 553 | | |
| |||
4014 | 4073 | | |
4015 | 4074 | | |
4016 | 4075 | | |
| 4076 | + | |
| 4077 | + | |
| 4078 | + | |
| 4079 | + | |
4017 | 4080 | | |
4018 | 4081 | | |
4019 | 4082 | | |
| |||
4114 | 4177 | | |
4115 | 4178 | | |
4116 | 4179 | | |
4117 | | - | |
4118 | | - | |
4119 | | - | |
4120 | 4180 | | |
4121 | | - | |
4122 | | - | |
| 4181 | + | |
4123 | 4182 | | |
4124 | 4183 | | |
4125 | 4184 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments