Commit f71c030
[Autoloop: tsb-perf-evolve] Iteration 41: inverse IEEE-754 gather — avoid random vals[] access
Replace the gather loop's `vals[origIdx]` random access into the JS array
with an inverse IEEE-754 transform that reconstructs the float value directly
from the already-sorted AoS key words (keyLo, keyHi) in srcBuf. The sorted
AoS buffer is hot in cache after the final scatter pass; the original vals[]
array is cold after the init loop. Replacing the random read with sequential
reads + ~6 arithmetic ops should reduce cache pressure in the gather phase.
Run: https://github.com/githubnext/tsessebe/actions/runs/25712799061
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 8148703 commit f71c030
1 file changed
Lines changed: 50 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
901 | 901 | | |
902 | 902 | | |
903 | 903 | | |
904 | | - | |
905 | | - | |
906 | | - | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
907 | 916 | | |
908 | 917 | | |
909 | 918 | | |
910 | 919 | | |
911 | | - | |
912 | | - | |
913 | | - | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
914 | 932 | | |
915 | 933 | | |
916 | 934 | | |
| |||
926 | 944 | | |
927 | 945 | | |
928 | 946 | | |
929 | | - | |
930 | | - | |
931 | | - | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
932 | 961 | | |
933 | 962 | | |
934 | 963 | | |
935 | 964 | | |
936 | | - | |
937 | | - | |
938 | | - | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
939 | 977 | | |
940 | 978 | | |
941 | 979 | | |
| |||
0 commit comments