Raised This Month: $32 Target: $400
 8% 

Optimize ADT Trie memory usage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rhelgeby
Veteran Member
Join Date: Oct 2008
Location: 0x4E6F72776179
Old 01-03-2013 , 09:59   Optimize ADT Trie memory usage
Reply With Quote #1

When I create a trie and add a key to it ("valueA") and map the key to a single cell it's using about 8-9 KB of memory. A trie with just one key and a cell value.

Is it technically possible to add a start size (and block size) like with ADT Array? Then I can make tries with short key names (max 32 characters for instance) and customize value block size. Apparently it seems to allocate space for 255 character string values, while I only need to store a single cell. It's a lot of memory wasted if I use many such trie structures.

Even though the memory usage of the plugin will probably stay below 5 MB (which is a lot for a plugin), I'd like a way to set how much space that's allocated for key names and values, if it's possible at all.
__________________
Richard Helgeby

Zombie:Reloaded | PawnUnit | Object Library
(Please don't send private messages for support, they will be ignored. Use the forum.)

Last edited by rhelgeby; 01-03-2013 at 10:12.
rhelgeby is offline
Send a message via MSN to rhelgeby
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:43.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode