FastCollectionsByLeo/README.md
Nique_372 e91d7706f7
2026-07-19 08:35:09 -05:00

1,015 B

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