Commit e5223e6
committed
Promote SELECT to fast opcode (89) - used in every print statement
SELECT was previously SLOWOP_SELECT (20) but is actually hot path code
called once for every print/say statement to get the default filehandle.
Performance impact:
- Eliminates SLOW_OP dispatch overhead
- Reduces bytecode size by 1 byte per print statement
- Improves CPU i-cache utilization
Dense opcodes now: 0-89 (no gaps, maintains tableswitch optimization)1 parent 0f20246 commit e5223e6
File tree
4 files changed
+30
-8
lines changed- src/main/java/org/perlonjava/interpreter
4 files changed
+30
-8
lines changedLines changed: 7 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
816 | 816 | | |
817 | 817 | | |
818 | 818 | | |
819 | | - | |
820 | | - | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
821 | 822 | | |
822 | 823 | | |
823 | 824 | | |
| |||
827 | 828 | | |
828 | 829 | | |
829 | 830 | | |
830 | | - | |
831 | | - | |
832 | | - | |
| 831 | + | |
| 832 | + | |
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
| |||
840 | 840 | | |
841 | 841 | | |
842 | 842 | | |
843 | | - | |
844 | | - | |
845 | | - | |
| 843 | + | |
| 844 | + | |
846 | 845 | | |
847 | 846 | | |
848 | 847 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
849 | 849 | | |
850 | 850 | | |
851 | 851 | | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
852 | 863 | | |
853 | 864 | | |
854 | 865 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
369 | 374 | | |
370 | 375 | | |
371 | 376 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
379 | 386 | | |
380 | 387 | | |
381 | 388 | | |
| |||
0 commit comments