Commit 97ff2d6
authored
Rollup merge of rust-lang#55384 - nnethercote:better-integer_lit-float_lit, r=michaelwoerister
Avoid unnecessary allocations in `float_lit` and `integer_lit`.
This commit avoids an allocation when parsing any float and integer
literals that don't involved underscores.
This reduces the number of allocations done for the `tuple-stress`
benchmark by 10%, reducing its instruction count by just under 1%.1 file changed
+19
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
497 | | - | |
498 | | - | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
499 | 508 | | |
500 | 509 | | |
501 | 510 | | |
| |||
591 | 600 | | |
592 | 601 | | |
593 | 602 | | |
594 | | - | |
595 | | - | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
596 | 611 | | |
597 | 612 | | |
598 | 613 | | |
| |||
0 commit comments