Skip to content
Snippets Groups Projects

Faster OGL sprite sorting algorithm

Merged Hannu Hanhi requested to merge Hannu_Hanhi/SRB2:ogl-sprite-qsort into next

This patch makes HWR_SortVisSprites faster by replacing selection sort ($O(n^2)

)withquicksort.() with quicksort. (
O(n \log n)$)

Performance comparison:

Before After
before 952 microseconds after 114 microseconds
before 409 microseconds after 71 microseconds

Merge request reports

Checking pipeline status.

Merged by avatar (May 4, 2025 12:41pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading