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

cyclic call happens via index and not via enumerator #7

Open
FellowWithLaptop opened this issue Sep 7, 2022 · 1 comment
Open

cyclic call happens via index and not via enumerator #7

FellowWithLaptop opened this issue Sep 7, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@FellowWithLaptop
Copy link

Since each module is first searched for in the linked list via index, the loop is 100 * (100+1)/2 = 5050 for 100 modules. With 500 modules it is 125,250 and with 1000 modules 500500. It is faster to run through the linked list with an enumerator.

@benhar-dev
Copy link
Owner

benhar-dev commented Nov 10, 2022

Hi @FellowWithLaptop, I totally agree. I'll be stripping out the collections soon and replacing these with a more generic collection which will also have the enumerator. Thank you for your feedback!

One thing I need to concider with this is that modules have the ability to leave the cyclic calling mechanism, so I'll need to take care with the enumerators to correctly idenfity this.

@benhar-dev benhar-dev added the enhancement New feature or request label Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants