for i, post in posts.pairs:
      for tag in post.tags:
        var lst = tagMap.getOrDefault(tag, @[])
        lst.add(i)
        tagMap[tag] = lst
    
    
    Run

This part will cause a double lookup, changing to
    
    
    for i, post in posts.pairs:
      for tag in post.tags:
        tagMap.mgetOrPut(tag, @[]).add(i)
    
    
    Run

That being said, it will probably not have the biggest impact I'm guessing this 
is mostly a `Table[string, X]` benchmark, and other languages with better Table 
will win

Reply via email to