Sergey_New Well-Known Member Licensed User Longtime User Dec 19, 2024 #1 Is it possible to use a variable in a Select Case procedure instead of listing values? B4X: Expand Collapse Copy Select Case "c" Case "a","b","c","d","e" ... Case Else ... End Select
Is it possible to use a variable in a Select Case procedure instead of listing values? B4X: Expand Collapse Copy Select Case "c" Case "a","b","c","d","e" ... Case Else ... End Select
LucaMs Expert Licensed User Longtime User Dec 20, 2024 #21 LucaMs said: I have to try. Click to expand... Tested with a million integers. B4XSet = about 1 ms List = about 2 ms Upvote 0
LucaMs said: I have to try. Click to expand... Tested with a million integers. B4XSet = about 1 ms List = about 2 ms
LucaMs Expert Licensed User Longtime User Dec 20, 2024 #22 I guess there is an "important" reason why Erel created B4XSet, since the difference from List seems non-existent to me. Unless in B4i List does not exist. Upvote 0
I guess there is an "important" reason why Erel created B4XSet, since the difference from List seems non-existent to me. Unless in B4i List does not exist.
William Lancee Well-Known Member Licensed User Longtime User Dec 20, 2024 #23 1msecs vs 2msecs is either "negligible" or "twice as fast" I suspect that it was a design decision while creating ordered lists which were needed for B4i, since in B4i order in maps is not maintained. So when we have the mechanism of ordered list, why not add a B4XSet - it would probably take him 5 mins - no harm done and adds the 'contains' method for large sets. The last few posts of this thread would have been a good chit chat topic. Upvote 0
1msecs vs 2msecs is either "negligible" or "twice as fast" I suspect that it was a design decision while creating ordered lists which were needed for B4i, since in B4i order in maps is not maintained. So when we have the mechanism of ordered list, why not add a B4XSet - it would probably take him 5 mins - no harm done and adds the 'contains' method for large sets. The last few posts of this thread would have been a good chit chat topic.
LucaMs Expert Licensed User Longtime User Dec 20, 2024 #24 William Lancee said: 1msecs vs 2msecs is either "negligible" or "twice as fast" Click to expand... LucaMs said: about 2 ms Click to expand... It is not known if it was 1.9 ms versus 2 ms. I'll try with 1,000,000,000! Unsorted maps ok, but B4XSet looks so similar to List that I just don't understand why it was created. William Lancee said: The last few posts of this thread would have been a good chit chat topic. Click to expand... Actually, it's better if I ask this (annoying ) question in a new thread. Upvote 0
William Lancee said: 1msecs vs 2msecs is either "negligible" or "twice as fast" Click to expand... LucaMs said: about 2 ms Click to expand... It is not known if it was 1.9 ms versus 2 ms. I'll try with 1,000,000,000! Unsorted maps ok, but B4XSet looks so similar to List that I just don't understand why it was created. William Lancee said: The last few posts of this thread would have been a good chit chat topic. Click to expand... Actually, it's better if I ask this (annoying ) question in a new thread.
LucaMs Expert Licensed User Longtime User Dec 20, 2024 #25 LucaMs said: I'll try with 1,000,000,000! Click to expand... 100 million. (logs) filling B4XSet... 7810 ms filling List... 16830 ms xsetData contains 77 0 ms lstData contains 77 3 ms Upvote 0
LucaMs said: I'll try with 1,000,000,000! Click to expand... 100 million. (logs) filling B4XSet... 7810 ms filling List... 16830 ms xsetData contains 77 0 ms lstData contains 77 3 ms
William Lancee Well-Known Member Licensed User Longtime User Dec 20, 2024 #26 I think we should start a new thread: "How fast is your lookup?" https://www.b4x.com/android/forum/threads/how-fast-is-your-lookup.164714/ Upvote 0
I think we should start a new thread: "How fast is your lookup?" https://www.b4x.com/android/forum/threads/how-fast-is-your-lookup.164714/