I tried to create a list from a SQLite table and intentionally had a descending order to give it a test. Populating the Trie ( indeed that's the correct spelling) works, but the search feature does not. I just like to emphasize that the list must be sorted in ascending order.
This started as an educational project but it can be useful in some cases. Trie is an interesting data structure that allows fast lookup of prefix matches. It is a tree of prefixes. Source: https://en.wikipedia.org/wiki/Trie In the B4X implementation, each node holds a character, a list of...
The benchmark tests for the Trie are impressive:
For a list of 386000 items, it took 1667 ms to build the Trie (index) the list on a Digiland tablet (OS 8.1), but took only 180 ms on a Samsung S10e (OS 11)
The B4XSearchTemplate using Prefix=true lagged behind, but still acceptable. For the same number of records, On the Digiland it took 6000 ms and on the S10e 580 ms