Skip to content

Conversation

@zonuexe
Copy link
Contributor

@zonuexe zonuexe commented Nov 23, 2023

Since this extension does not require any properties, this change should reduce memory usage by a very very very small amount.

@zonuexe
Copy link
Contributor Author

zonuexe commented Nov 23, 2023

In my opinion, constants are better than properties, so I'm considering removing properties in other places as well, but are there any chances that these changes will be accepted? zonuexe@6422449

I'm torn between arguing that PHPStan's processes are likely to run frequently, so it makes sense to make micro optimizations, and that these changes have no performance impact, so they should not be changed unnecessarily.

@ondrejmirtes
Copy link
Member

Yeah I'll accept this but not because of performance (which is not going to be mesurable) but because it makes sense code-wise and design-wise.

@ondrejmirtes ondrejmirtes merged commit 9b02119 into phpstan:1.10.x Nov 26, 2023
@ondrejmirtes
Copy link
Member

Thank you!

@zonuexe zonuexe deleted the refactor/property-to-const branch November 26, 2023 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants