Count the slots in the grid: three. Every one is a separate write, and a storage write is the most expensive thing a contract does.
None of these needs 256 bits. A fee of 5, a limit of 100, a window of 3600 seconds.
A slot is 256 bits, so two uint64 fit in one with room to spare. Narrow fee and window, and leave limit where it is for now:
uint256 public fee; -> uint64 public fee; uint256 public window; -> uint64 public window;
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
contract Config {
uint256 public fee;
uint256 public limit;
uint256 public window;
function update(uint64 f, uint64 l, uint64 w) external {
fee = f;
limit = l;
window = w;
}
}