Map [1]
| Operation | Time Complexity |
|---|---|
| Access | O(log n) |
| Search | O(log n) |
| Insertion | O(n) for <= 32 elements, O(log n) for > 32 elements [2] |
| Deletion | O(n) for <= 32 elements, O(log n) for > 32 elements |
| // System Specs | |
| // ============ | |
| // These benchmarks were run on an Intel i7-9700k @ 3.6 GHz | |
| // | |
| // How it was run | |
| // =============== | |
| // The correct recipe is at the very end of the list of recipes. Which means this must run | |
| // through the entire list, the worst case scenario. The rest of the recipes are randomized | |
| // to offer some variation, but I don't set the slots where the correct recipe has the correct slots. | |
| // to ensure we don't accidentally exit early. |
| $ zig targets | |
| { | |
| "arch": [ | |
| "arm", | |
| "armeb", | |
| "aarch64", | |
| "aarch64_be", | |
| "aarch64_32", | |
| "arc", |