8000 faster lookups instead of nested loops by henrikthesing · Pull Request #207 · auraphp/Aura.Router · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

faster lookups instead of nested loops #207

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

Merged
merged 2 commits into from
Apr 24, 2025

Conversation

henrikthesing
Copy link

I try to optimize the performance of the buildTokenReplacements() method by using array_flip for faster lookups instead of nested loops.

8000
@harikt harikt changed the title Used array_flip for faster lookups instead of nested loops faster lookups instead of nested loops Apr 18, 2025
@harikt
Copy link
Member
harikt commented Apr 18, 2025

Hi @henrikthesing,

I have removed the array_flip and believe we can use $this->data[$name] itself. All tests are passing . Any other issues you find in this ?

@harikt
Copy link
Member
harikt commented Apr 18, 2025

@koriym could you please verify and merge ?

Asked our expert copilot and is fine with it ;-)

Thank you.

@harikt harikt merged commit fbada57 into auraphp:3.x Apr 24, 2025
15 checks passed
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.

4 participants
0