Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace some assignment operators with idential operators #32

Merged
merged 2 commits into from May 6, 2018

Conversation

Projects
None yet
2 participants
@C-Lodder
Copy link
Contributor

C-Lodder commented Apr 24, 2018

Performance improvements with operators.

I can continue working on the rest of the files if you wish

Equality Operator (==):
xi8w7

Identialcal Operator (===):
gs1eh

@undeflabs

This comment has been minimized.

Copy link
Owner

undeflabs commented Apr 25, 2018

I would do not change files which are developed by others, like the files in

includes/core/XmlRpc/*
includes/core/gbxdatafetcher.class.php
includes/core/mxinfofetcher.class.php
includes/dedimania/*
includes/maniaexchange/*
includes/musicserver/*

Anyway I think that those changes doesn't change the performance much, do you have some benchmarks about this topic?

@C-Lodder

This comment has been minimized.

Copy link
Contributor Author

C-Lodder commented Apr 25, 2018

I don't have any benchmarks, but it's a known small performance boost because when matching values, it doesn't do typecasting. Check the screenshots above to see the differences of the checks.

https://stackoverflow.com/questions/2401478/why-is-faster-than-in-php

I can revert the vendor files if need be, but are they ever updated anymore?

@undeflabs

This comment has been minimized.

Copy link
Owner

undeflabs commented Apr 25, 2018

I read https://stackoverflow.com/questions/2401478/why-is-faster-than-in-php and I do believe it is good for performance, but I think that the improvement is not that great for the amount of work. But if you want to do it, keep going.

All of these files are still updated from time to time:
includes/core/XmlRpc/*
includes/core/gbxdatafetcher.class.php
includes/core/mxinfofetcher.class.php
includes/maniaexchange/*
includes/musicserver/*
So it would be better to revert the changes and keep them untouched.

The whole dedimania related files should be rewritten anyway (sometime later).

@C-Lodder

This comment has been minimized.

Copy link
Contributor Author

C-Lodder commented Apr 25, 2018

Sure, I'll revert the vendor files and continue working on the rest of the controller tomorrow.

@C-Lodder

This comment has been minimized.

Copy link
Contributor Author

C-Lodder commented Apr 27, 2018

@undeflabs files reverted

@undeflabs undeflabs merged commit a2bede4 into undeflabs:master May 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.