Author: | neon-sunset |
---|---|
Assignees: | - |
Labels: | `tenet-performance`, `area-CodeGen-coreclr` |
Milestone: | - |
Open neon-sunset opened 11 months ago
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch See info in area-owners.md if you want to be subscribed.
Author: | neon-sunset |
---|---|
Assignees: | - |
Labels: | `tenet-performance`, `area-CodeGen-coreclr` |
Milestone: | - |
The key difference between these two is that for u8 (spans) we unroll them in a late phase (lowering) where we don't see that one of the inputs is a constant, we only know that the length is const.
So we don't have a mechanism to get the actual RVA content, but, IMO it's not a big deal and should be more or less the same perf.
Description
It appears that with
ROS<char>
produces optimal codegen when callingspan.SequenceEqual("[literal]")
which is not the case for ROSspan.SequenceEqual("[literal]"u8)
Configuration
Regression?
No
Data
C
Eq8
Eq16
Analysis
For lengths that do not perfectly round to vector width, there are further differences.
Please see https://sharplab.io/#v2:EYLgxg9gTgpgtADwGwBYA0AXEBDAzgWwB8ABAJgEYBYAKGIGYACY8pJ0hgYQYG8aH+mLBsAgQANgwCiARwAcACgBKMbABMA8gDsxATwDKAB2yaAPMB0YYAPgYBLTQYCuGAJQMAvFb4Cf9pxgA6PRhpRxhNMBgZR2wxeQAiAAkYMTEINAYAdWgxVQBCBmTU9Kyc/IY4Srh4x1kXAG4ab35mVhFxKWkWJRUNbX0jUzAAC2woGz9nN09mnzsHZyCQsIio0NiEorSM7Khcgsr4htnZ1uFRCRlZPWHoDB61LV1DYzMLa3n/aYmFwODQ8KRaIbJIpNJ5Gp1RrUHynITtS5dJA3O4PPrPQYmEZjH5fDy4xb/FZA9ZxUHFCHHagAXyAA