Split keys and slots and allocate them both together

This commit is contained in:
gingerBill
2026-03-16 18:04:25 +00:00
parent 36d5a19115
commit cb7a87773b
4 changed files with 46 additions and 27 deletions

View File

@@ -182,8 +182,9 @@ gb_internal isize string_index_byte(String const &s, u8 x) {
}
gb_internal gb_inline bool str_eq(String const &a, String const &b) {
if (a.len != b.len) return false;
if (a.len == 0) return true;
if (a.len != b.len) return false;
if (a.len == 0) return true;
if (a.text == b.text) return true;
return memcmp(a.text, b.text, a.len) == 0;
}
gb_internal gb_inline bool str_ne(String const &a, String const &b) { return !str_eq(a, b); }