1
0
Ответвление 0
ответвлён от nique_372/FastCollectionsByLeo
Нет описания
Найти файл
2026-07-19 22:56:49 -05:00
Src/ColHash new files added 2026-07-19 22:56:49 -05:00
Test 2026-07-19 09:25:59 -05:00
dependencies.json Añadir dependencies.json 2026-07-19 13:37:42 +00:00
FastCollectionsByLeo.mqproj Generated by MQL5 Wizard 2026-07-19 08:23:37 -05:00
LICENSE Añadir LICENSE 2026-07-19 13:37:10 +00:00
README.md 2026-07-19 08:35:09 -05:00

FastCollectionsByLeo

Generic

Fast HashMap

void OnStart()
 {
  CHashMapFast(string, int) map;
  map.Add("hola", 10);
  map.Add("cinco", 10);
  map.Add("My key:", 20);
  map.Add("Yo: ", 20);
 
  CHashMapFastIterator(string, int) it = map.BeginIteration();
  while(it.IsValid())
   {
    Print(it.Key(), " = ", it.Val());
    it.Next();
   }
 }

Hash map benchmarks

  • Access test over 100,000 iterations
  • Converting ENUM_TIMEFRAMES (string) to integer
  • Same PC used for all tests
Class Time (microseconds, 100,000 iterations)
Perfect Hash ~1705
CHashMapFast 1925–1949
CDictSValue 2438–2466
CHashMap 8750–8827
Linear 9818–9869

Test in Final.mq5