Make the SSE string operations faster
- Dominant language
- C++
- Stars
- 8k
- Forks
- 351
- Avg merge
- 12h 31m
- Merged PRs (30d)
- 102
Description
Deadlock and more importantly Unreal Engine 3 (A hat in Time is a good one) abuse the SSE string operations.
Specifically `pcmpistri xmm0, xmm1, 0xd` in UE3 and `pcmpistri xmm0, xmm1, 0xc` in Deadlock.
We can make these instructions faster, especially with some SVE operations being pretty good for flag setting. Determine what it would take to convert these instructions to inline ASM rather than jumping out to a C helper.
Contributor guide
Research direction
Start by locating the C helper and dispatch paths for pcmpistri with immediates 0xc and 0xd. Read the existing SVE support for flag-setting operations and compare the UE3 and Deadlock instruction paths. Done means assessing and, if practical, replacing the helper jumps with inline assembly while preserving the required instruction results and flags.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux
- Domain
- operating-systems, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100