Skip to content

Speed up random range creation#6812

Merged
BMagnu merged 1 commit into
scp-fs2open:masterfrom
BMagnu:randomrange_speedup
Jul 8, 2025
Merged

Speed up random range creation#6812
BMagnu merged 1 commit into
scp-fs2open:masterfrom
BMagnu:randomrange_speedup

Conversation

@BMagnu

@BMagnu BMagnu commented Jul 8, 2025

Copy link
Copy Markdown
Member

Extracted from #6808.
Originally I thought it's fine to leave it in #6808, as that PR itself introduces a significant reliance on random range performance, but it turns out that random range creation happens during weapon_create, and is thus already quite a performance waste.

@BMagnu BMagnu added the optimization Trying to make the engine and tools more efficient label Jul 8, 2025

@wookieejedi wookieejedi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find and fix!

@BMagnu BMagnu merged commit 497b834 into scp-fs2open:master Jul 8, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

optimization Trying to make the engine and tools more efficient

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants