Page 1 of 2

RadixTree license from IDE

Posted: Mon Jan 13, 2025 11:55 am
by Webarion
Hello! I would like to use the RadixTree algorithm from the file RadixTree.pb
The question is: if I use this algorithm in my program, which is in no way associated with the PureBasic IDE, will my program be owned by Fantaisie Software under the LICENSE-FANTAISIE?

Re: RadixTree license from IDE

Posted: Mon Jan 13, 2025 8:41 pm
by idle
if you want a trie you can use squint3 it's lock free concurrent and is licensed as eclipse 2 so you can use it commercially
https://github.com/idle-PB/Squint3

Re: RadixTree license from IDE

Posted: Tue Jan 14, 2025 3:45 am
by Webarion
idle wrote: Mon Jan 13, 2025 8:41 pm if you want a trie you can use squint3 it's lock free concurrent and is licensed as eclipse 2 so you can use it commercially
https://github.com/idle-PB/Squint3
Thank you for your answer! How different is Squint3 from RadixTree in terms of speed and memory footprint?

Re: RadixTree license from IDE

Posted: Tue Jan 14, 2025 4:03 am
by idle
Webarion wrote: Tue Jan 14, 2025 3:45 am
idle wrote: Mon Jan 13, 2025 8:41 pm if you want a trie you can use squint3 it's lock free concurrent and is licensed as eclipse 2 so you can use it commercially
https://github.com/idle-PB/Squint3
Thank you for your answer! How different is Squint3 from RadixTree in terms of speed and memory footprint?
I Haven't done any tests against the radix tree in the IDE so no idea.

Re: RadixTree license from IDE

Posted: Tue Jan 14, 2025 4:06 am
by Webarion
idle wrote: Tue Jan 14, 2025 4:03 am
Webarion wrote: Tue Jan 14, 2025 3:45 am
idle wrote: Mon Jan 13, 2025 8:41 pm if you want a trie you can use squint3 it's lock free concurrent and is licensed as eclipse 2 so you can use it commercially
https://github.com/idle-PB/Squint3
Thank you for your answer! How different is Squint3 from RadixTree in terms of speed and memory footprint?
I Haven't done any tests against the radix tree in the IDE so no idea.
Thank you I understand. I'll test it.
I showed some minor errors found in the examples: https://github.com/idle-PB/Squint3/issues/1

Re: RadixTree license from IDE

Posted: Tue Jan 14, 2025 4:10 am
by Webarion
Later, I will write about tests.
Still, I think that if the license is so strict for a well-known algorithm such as RadixTree, then I will have to write my own version of this algorithm.

Re: RadixTree license from IDE

Posted: Tue Jan 14, 2025 4:11 am
by idle
Webarion wrote: Tue Jan 14, 2025 4:06 am
idle wrote: Tue Jan 14, 2025 4:03 am
Webarion wrote: Tue Jan 14, 2025 3:45 am
idle wrote: Mon Jan 13, 2025 8:41 pm if you want a trie you can use squint3 it's lock free concurrent and is licensed as eclipse 2 so you can use it commercially
https://github.com/idle-PB/Squint3
Thank you for your answer! How different is Squint3 from RadixTree in terms of speed and memory footprint?
I Haven't done any tests against the radix tree in the IDE so no idea.
Thank you I understand. I'll test it.
I showed some minor errors found in the examples: https://github.com/idle-PB/Squint3/issues/1
I haven't updated the examples, in a while and I'm in the process of doing some updates to the numeric functions
so will be a couple of days.

Re: RadixTree license from IDE

Posted: Tue Jan 14, 2025 4:47 am
by idle
Webarion wrote: Tue Jan 14, 2025 4:10 am Later, I will write about tests.
Still, I think that if the license is so strict for a well-known algorithm such as RadixTree, then I will have to write my own version of this algorithm.
If you want a radix tree specifically ask fred or freak if you can use it.
What's your use case?

Re: RadixTree license from IDE

Posted: Tue Jan 14, 2025 7:19 am
by AZJIO
It would be nice if these features were added to PureBasic.

Re: RadixTree license from IDE

Posted: Wed Jan 15, 2025 12:03 pm
by Webarion
I tested three algorithms and got the following result:

; For 100000 words (minimum of 20 tests):

; squint3.3.pbi
; Write Keys, Time: 183ms.
; Read Key, Time: 647ms. (1000000 cicles)
; Memory by resource monitor: 23676Kb (difference before adding and after adding)

; RadixTree.pb
; Write Keys, Time: 191ms.
; Read Key, Time: 862ms. (1000000 cicles)
; Memory by resource monitor: 9320Kb (difference before adding and after adding)

; Map internal
; Write Keys, Time: 525ms.
; Read Key, Time: 135ms. (1000000 cicles)
; Memory by resource monitor: 6276Kb (difference before adding and after adding)


Link to test code: https://drive.google.com/file/d/1ZwVVQ5 ... drive_link

Re: RadixTree license from IDE

Posted: Wed Jan 15, 2025 9:18 pm
by idle
Squint will tell you it's allocated size with squint\size()

Re: RadixTree license from IDE

Posted: Wed Jan 15, 2025 9:56 pm
by Webarion
idle wrote: Wed Jan 15, 2025 9:18 pm Squint will tell you it's allocated size with squint\size()
Thanks for the advice! I'll watch this. But, unfortunately, I don’t yet know how to truly compare the memory occupied by the structures of these three algorithms. Your development has this tool, other versions do not have such a tool. Therefore, with memory it is still subjective.

Re: RadixTree license from IDE

Posted: Wed Jan 15, 2025 10:22 pm
by Webarion
idle wrote: Wed Jan 15, 2025 9:18 pm Squint will tell you it's allocated size with squint\size()
Do you have a procedure for displaying the number of words recorded? For example, in Map this can be done through MapSize, and RadixTree also has something similar. I didn’t find anything similar with you, maybe I didn’t guess it myself.

Re: RadixTree license from IDE

Posted: Wed Jan 15, 2025 10:40 pm
by idle
squint\Numkeys()

Re: RadixTree license from IDE

Posted: Thu Jan 16, 2025 9:18 am
by Webarion
idle wrote: Wed Jan 15, 2025 10:40 pmsquint\Numkeys()
Then the result of squint3.3.pbi is different from the rest:

113930 keys in squint3.3.pbi
100000 keys in RadixTree.pb
100000 keys in Map


Link to test code: https://drive.google.com/file/d/16kSK7P ... drive_link