- reordering saves 8 bytes per struct (on typical 64-bit platforms)
- don't assume that *max_load_out is initialized reasonably
(the doc-comment doesn't suggest that it's needed)
kru_price_t price;
uint16_t price16, limit16;
uint16_t id;
- uint16_t *load;
uint16_t final_load_value; // set by kru_limited_update if not blocked
+ uint16_t *load;
};
/// Phase 1/3 of a query -- hash, prefetch, ctx init. Based on one 16-byte key.
}
if (max_load_out) {
+ *max_load_out = 0;
for (size_t i = 0; i < queries_cnt; i++) {
*max_load_out = MAX(*max_load_out, ctx[i].final_load_value);
}