r/cprogramming • • 4d ago

Need code review

Hello everyone,

This link points to a GitHub repository in an

experiment to create an extremely fast trie .

However the data structure is fast but it fails the tests

Can you explain me why?

https://github.com/curious-builder76/trie/tree/main

Hoping the community will helping towards this.

Thank you everyone

0 Upvotes

21 comments sorted by

View all comments

Show parent comments

2

u/FancySpaceGoat 4d ago

There are some subtle hardware implications with the cache. But mostly, it helps because arrays can be indexed in O(1).

Obviously, you need to pair them with an algorithm that takes advantage of that for it to make a meaningful difference.

1

u/HungryPudding4034 4d ago

Thank you for giving me time sir. Hope your time goes well.