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

Improve simple string generator method #992

Closed
wants to merge 19 commits into from
Closed

Conversation

realodix
Copy link
Owner

@realodix realodix commented May 16, 2024

The random string generator method is very slow, so the simpleString method (up to 10x faster) was created to reduce the use of the random string generator method.

But the method is too simple. Only 2 unique strings can be generated by the simpleString method, all others must use the random string generator method.

// Only 2 unique strings

['ravel', 'https://github.com/laravel/laravel'],
['ravel', 'https://stackoverflow.com/questions/tagged/laravel'],
['ravel', 'https://www.youtube.com/hashtag/laravel'],
['ravel', 'https://www.reddit.com/r/laravel/'],
['ravel', 'https://dev.to/t/laravel'],
['ravel', 'https://laracasts.com/topics/laravel'],
['ravel', 'https://laravel.io/forum/tags/laravel'],
['ravel', 'https://medium.com/tag/laravel'],
['ravel', 'https://fontawesome.com/icons/laravel'],

['ravel', 'https://en.wikipedia.org/wiki/Laravel'],
['ravel', 'https://id.wikipedia.org/wiki/Laravel'],

['ework', 'https://github.com/topics/framework'],
['ework', 'https://github.com/laravel/framework'],
['ework', 'https://github.com/codeigniter4/framework'],
['ework', 'https://github.com/spring-projects/spring-framework'],
['ework', 'https://github.com/ionic-team/ionic-framework'],

With this PR, we can further reduce the usage of random string generator.

['glvel', 'https://github.com/laravel/laravel'],
['sqdel', 'https://stackoverflow.com/questions/tagged/laravel'],
['yhvel', 'https://www.youtube.com/hashtag/laravel'],
['rrvel', 'https://www.reddit.com/r/laravel/'],
['dtvel', 'https://dev.to/t/laravel'],
['ltvel', 'https://laracasts.com/topics/laravel'],
['lfsel', 'https://laravel.io/forum/tags/laravel'],
['mtvel', 'https://medium.com/tag/laravel'],
['fivel', 'https://fontawesome.com/icons/laravel'],

['ewvel', 'https://en.wikipedia.org/wiki/Laravel'],
['iwvel', 'https://id.wikipedia.org/wiki/Laravel'],

['gtork', 'https://github.com/topics/framework'],
['glork', 'https://github.com/laravel/framework'],
['gcork', 'https://github.com/codeigniter4/framework'],
['gsork', 'https://github.com/spring-projects/spring-framework'],
['giork', 'https://github.com/ionic-team/ionic-framework'],

@realodix realodix marked this pull request as draft May 16, 2024 19:31
@realodix realodix closed this May 21, 2024
@realodix realodix deleted the generateSimpleString branch May 21, 2024 07:32
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.

None yet

1 participant