Skip to content

Commit 756b331

Browse files
authored
Reduce allocations when printing commands (#20)
Removed the usage of `std::map` and a large bunch of string allocations when doing auto completion. A side effect of not using the map; the commands are no longer sorted! It's now the consumer who has to provide the order. Could add a constexpr sorting helper to operate on the span but it will require that we remove some constness. Also did some renaming to make it more clear about what's going on.
1 parent b49a5ce commit 756b331

File tree

2 files changed

+190
-118
lines changed

2 files changed

+190
-118
lines changed

0 commit comments

Comments
 (0)