linebender / linebender/tiny-skia

Optimize u16/lowp pipeline on Arm

Open
#55 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.6k
Forks
99
Avg merge
2h 52m
Merged PRs (30d)
1

Description

Currently we're 2-4x slower in some benchmarks on Apple M1. This is with ARM NEON.

Benchmark results: https://razrfalcon.github.io/tiny-skia/arm.html

- u16 blend operations are 2x slower than Skia. No idea why. Maybe we should try using u16x8 lane instead of u16x16 for ARM
- rectangle fill is like 6x slower during benchmarks for no reason, but only 2x slower when run separately
- gradients are 2-3x slower, probably because we have to use f32x16, and the current f32<->u16 cast code doesn't use NEON. f32/highp is actually faster, which is bizarre

Otherwise, performance is decent.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ARM benchmark results at the linked benchmark page and reproduce the Apple M1 comparisons. Investigate the u16 blend, rectangle-fill, and gradient paths, including the NEON and f32-to-u16 conversion concerns described in the issue. Done means the affected ARM benchmarks improve and remain correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.