Skip to content

Replace pow() call with ** operator (micro performance optimization)#622

Merged
mblaney merged 1 commit intosimplepie:masterfrom
Ayesh:php56-pow-enhancement
Sep 22, 2019
Merged

Replace pow() call with ** operator (micro performance optimization)#622
mblaney merged 1 commit intosimplepie:masterfrom
Ayesh:php56-pow-enhancement

Conversation

@Ayesh
Copy link
Copy Markdown
Contributor

@Ayesh Ayesh commented Sep 20, 2019

Since PHP 5.6, we can use the ** operator to achieve the same result. However, because ** is a language operator, it is about 4 time faster compared to the pow() function call.

This is purely a micro performance optimization, but an optimization without the a BC break or side effects. May I suggest that we replace the pow() as in the commits?

I would also like to mention #620, and it would be great if this could be included in the new release as well, so we can get this into WordPress downstream as well.

Thank you.

@mblaney mblaney merged commit 9a4a0eb into simplepie:master Sep 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants