struct InternTable {
    HashTable<String> strings; // general allocator
    BlockArena arena;
};

String Intern(InternTable *table, String string) {
    String *value = table->strings.get(string);
    if (!value) {
        String copy = Copy(table->arena, string);
        table->strings.put(copy, copy);
        return copy;
    }
    return *value;
}

// We use the intern table to optimize for space, I don't want to worry about freeing
// buffer names and event text data so let it all accumulate and interning will at least
// optimize worst offenders (like event text)
InternTable GlobalInternTable;