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

Change EmojiTrie implementation to SuffixTree #51148

Open
hannojg opened this issue Oct 21, 2024 · 7 comments
Open

Change EmojiTrie implementation to SuffixTree #51148

hannojg opened this issue Oct 21, 2024 · 7 comments

Comments

@hannojg
Copy link
Contributor

hannojg commented Oct 21, 2024

For this issue ticket we have implemented a very efficient/fast suffix tree implementation:

PR:

It was discussed that we want to use the implementation of the SuffixTree for the emoji search as well:

This enables:

  • more efficient search in emojis
  • faster construction of the emoji tree (we should compare the construction time before and after the change.)
  • searching for any substring of an emoji name (not just perfect name matches)
@hannojg
Copy link
Contributor Author

hannojg commented Oct 21, 2024

cc @roryabraham

@ChavdaSachin
Copy link
Contributor

ChavdaSachin commented Oct 21, 2024

Hey @hannojg, I have been very passionate Competitive Programmer back during my college days.
I think I could be a help here.
Do you think there is a scope for an External contributor here?

@hannojg
Copy link
Contributor Author

hannojg commented Oct 21, 2024

I think this is more of an internal ticket. The suffix tree implementation has already been built by our internal team and this is a follow up issue from one of our PRs.

@ChavdaSachin
Copy link
Contributor

Alright,
But I have one more suggestion here, we could make use of c++ here instead of js , c++ is well known for it's speed, I am really positive that c++ would make significant improvement here.

@melvin-bot melvin-bot bot added the Monthly KSv2 label Oct 24, 2024
Copy link

melvin-bot bot commented Jan 6, 2025

@hannojg, this Monthly task hasn't been acted upon in 6 weeks; closing.

If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.

@hannojg
Copy link
Contributor Author

hannojg commented Jan 7, 2025

@mountiny can you please reopen? The initial PR for changing the search algorithm to a search tree took longer than anticipated. We are going to look into these items next, so its still l a priority!

@hannojg
Copy link
Contributor Author

hannojg commented Jan 7, 2025

But I have one more suggestion here, we could make use of c++ here instead of js , c++ is well known for it's speed, I am really positive that c++ would make significant improvement here.

Yes, while c++ might be faster there is a significant cost for bringing the data from JS over to C++ which might eat away the performance benefits. The current typescript implementation is already pretty fast.
We could open a follow up ticket to see if there is any benefit in bringing this to C++, but for now we are good I'd say

@mountiny mountiny reopened this Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants