Skip to content

Gpt: Speed up path rasterization#587

Open
treeform wants to merge 1 commit into
masterfrom
pixie-gpt
Open

Gpt: Speed up path rasterization#587
treeform wants to merge 1 commit into
masterfrom
pixie-gpt

Conversation

@treeform

Copy link
Copy Markdown
Owner

Speeds up the SVG path rasterizer by:

  • caching reciprocal slopes for scanline coverage
  • computing each segment partition range once
  • reusing partition counts as insertion indexes
  • passing the active partition directly into coverage calculation

Benchmark: nim r -d:danger tests/bench_svg.nim

  • before: 6.930 ms minimum
  • after: 6.688 ms minimum
  • repeated final minima: 6.688, 6.749, 6.723 ms

Verified with:

  • nim check tests/test_svg.nim
  • nim r -d:danger tests/test_svg.nim
  • nim r tests/tests.nim
  • git diff --check

@treeform treeform changed the title Speed up path rasterization Gpt: Speed up path rasterization Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant