Please publish the internal existing Numeric Map functions as purebasic functions.
NewNumericMap, etc
Thanks

Would have to be nicely implemented by FredChrisR wrote: Sat Jan 20, 2024 6:32 pm +1, It would be really nice to have it natively to avoid AddMapElement(Map(), Str(Key)), FindMapElement(Map(), Str(Key))
and a second +1 if the function is already there![]()
For Christmas it's too late but we have until January 31st to wish to all a happy new yearidle wrote: Sun Dec 15, 2019 10:22 pmNote to self, don't unwrap Fred's xmas presentsFred wrote:Messing with internal code isn't really a trick and tips as it can be broken anytime. If it's not released, it's because it's ready for![]()
Use Squint3 it's a bit faster than a map, grows dynamically and is faster to exit if a key doesn't existChrisR wrote: Sat Jan 20, 2024 8:27 pm Thanks for the link![]()
For Christmas it's too late but we have until January 31st to wish to all a happy new yearidle wrote: Sun Dec 15, 2019 10:22 pmNote to self, don't unwrap Fred's xmas presentsFred wrote:Messing with internal code isn't really a trick and tips as it can be broken anytime. If it's not released, it's because it's ready for![]()
or else it's good to keep dreaming that one day it will arrive![]()
Promise the next time I need a map with a numeric or alphanumeric key and a bit of performance, I'll try Squint3idle wrote: Sat Jan 20, 2024 9:47 pm Use Squint3 it's a bit faster than a map, grows dynamically and is faster to exit if a key doesn't exist
https://www.purebasic.fr/english/viewtopic.php?t=79453
truth be told I can barely control the code and I wrote it.ChrisR wrote: Sat Jan 20, 2024 10:30 pmPromise the next time I need a map with a numeric or alphanumeric key and a bit of performance, I'll try Squint3idle wrote: Sat Jan 20, 2024 9:47 pm Use Squint3 it's a bit faster than a map, grows dynamically and is faster to exit if a key doesn't exist
https://www.purebasic.fr/english/viewtopic.php?t=79453![]()
I had already seen your great Module (like other great code from you. Looking at them makes me feel like a noob) but I haven't used it yet.
Code with embedded C or ASM has always scared me a bit, because I don't know anything about them, I don't know what's being done and I can't control the code if I need to. Even if I'm confident
squints Trie functions can be string keys or binary keys using the binary functions (but you don't mix binary and string keys in same trie)AZJIO wrote: Sat Jan 20, 2024 10:49 pm The key is not just a string, but the binary data of the string. Perhaps another good way is to pass a pointer to a string, then it would be possible to add another parameter - the length of the string StringByteLength(). If the length is not specified, then it is determined by 00, and if a pointer to a number is used, then SizeOf can be specified. In any case, the data will no longer have a special type.
definitely faster and less conflict as integer key doesn't need to hash at all , it just need to divide the slot number and store in table only .skywalk wrote: Sat Jan 20, 2024 5:33 pm Is there a significant speed improvement with map access using integer keys?