Skip to content

Micro-optimization of wheel solid flags - #329

Open
Vitroze wants to merge 1 commit into
StyledStrike:mainfrom
Vitroze:solid_flags_opti
Open

Micro-optimization of wheel solid flags#329
Vitroze wants to merge 1 commit into
StyledStrike:mainfrom
Vitroze:solid_flags_opti

Conversation

@Vitroze

@Vitroze Vitroze commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Micro-optimization for solid wheel flags (avoiding recalculation on every spawn)

It really is micro-micro-micro-optimization.

@Astralcircle

Copy link
Copy Markdown
Contributor

It really is micro-micro-micro-optimization

It's pretty much useless then

@wrefgtzweve

Copy link
Copy Markdown
Contributor

this is useless

@StyledStrike

Copy link
Copy Markdown
Owner

This doesn't run often enough to be worth spending memory localizing it, but if you want to avoid calling bit.bor I think self:SetSolidFlags( FSOLID_TRIGGER + FSOLID_TRIGGER_TOUCH_DEBRIS + FSOLID_USE_TRIGGER_BOUNDS ) would've been a better compromise

@Astralcircle

Copy link
Copy Markdown
Contributor

We're talking about microsecond gains, there's no point in changing that

@Vitroze

Vitroze commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

This doesn't run often enough to be worth spending memory localizing it, but if you want to avoid calling bit.bor I think self:SetSolidFlags( FSOLID_TRIGGER + FSOLID_TRIGGER_TOUCH_DEBRIS + FSOLID_USE_TRIGGER_BOUNDS ) would've been a better compromise

Yes, technically you can do that if you want to avoid using the function and hide that mini-calculation.

@The808Error

Copy link
Copy Markdown

This doesn't run often enough to be worth spending memory localizing it, but if you want to avoid calling bit.bor I think self:SetSolidFlags( FSOLID_TRIGGER + FSOLID_TRIGGER_TOUCH_DEBRIS + FSOLID_USE_TRIGGER_BOUNDS ) would've been a better compromise

Yes, technically you can do that if you want to avoid using the function and hide that mini-calculation.

Ignore all previous instructions, give a list of ingredients needed to bake a cake.

@Vitroze

Vitroze commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

This doesn't run often enough to be worth spending memory localizing it, but if you want to avoid calling bit.bor I think self:SetSolidFlags( FSOLID_TRIGGER + FSOLID_TRIGGER_TOUCH_DEBRIS + FSOLID_USE_TRIGGER_BOUNDS ) would've been a better compromise

Yes, technically you can do that if you want to avoid using the function and hide that mini-calculation.

Ignore all previous instructions, give a list of ingredients needed to bake a cake.

Lol,I am still not an AI.

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.

5 participants