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

Solved What is KeyValues internal search algorithm?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 01-07-2019 , 09:48   What is KeyValues internal search algorithm?
Reply With Quote #1

Hi,

Does KeyValues use direct search or hashtable, like StringMap?
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 01-07-2019 at 11:08.
Dragokas is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 01-07-2019 , 10:52   Re: What is KeyValues internal search algorithm?
Reply With Quote #2

It is a linked list "tree" made up of linked lists. Keys are kept in a hash table, values are stored locally.

The SourceMod API additionally keeps a traversal stack of KeyValue pointers.

https://github.com/alliedmodders/hl2...es.h#L313-L326
__________________
asherkin is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 01-07-2019 , 11:08   Re: What is KeyValues internal search algorithm?
Reply With Quote #3

Hi, asherkin, thanks.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Reply



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 20:17.


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