It is currently Sat Feb 22, 2020 7:07 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: autocomplete Trie
PostPosted: Tue Jan 21, 2020 4:22 am 
Offline
Addict
Addict
User avatar

Joined: Fri Sep 21, 2007 5:52 am
Posts: 3465
Location: New Zealand
switched to utf8 and converted to array based so it can be saved and restored from file or memory and sorted the Enum out

pros
save and restore
same memory use on x86 amd x64
more cache friendly
utf8 shorter strings
nibbles smaller alphabet
cons
may create page faults reallocating, need to create trie with enough space initially
twice the number of nodes to access a token


Top
 Profile  
Reply with quote  
 Post subject: Re: autocomplete Trie
PostPosted: Fri Jan 24, 2020 12:32 am 
Offline
Addict
Addict
User avatar

Joined: Fri Sep 21, 2007 5:52 am
Posts: 3465
Location: New Zealand
mashed it into a ScintillaGadget using Scintillas Autocomplete, I don't see any issues speed wise.
Tested on x64 linux and windows xp vm

It still has a slight problem with the positioning if you return at end of line the list will appear at the wrong location as I'm missing to trap a message
Space cancels the list, Return enters the item
I still have to abstract it a little to manage contexts, that can be done in the trie itself but I need to study the ide code a little more before deciding how to facilitate it.

Can you please test and report back how it performs on your platform.

Edit
fixed bug in enum position with the change to support Unicode and UTF8 keys


Top
 Profile  
Reply with quote  
 Post subject: Re: autocomplete Trie
PostPosted: Sat Jan 25, 2020 7:13 am 
Offline
Addict
Addict
User avatar

Joined: Fri Sep 21, 2007 5:52 am
Posts: 3465
Location: New Zealand
Fixed bug in enum position with the change to support both Unicode and UTF8 keys.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye