Profile first: most slowness comes from network waterfalls, oversized bundles and re-rendering, not from arithmetic. Batch RPC calls, cache immutable results, debounce input handlers and lazily load heavy modules.
const debounced = (fn, ms) => {
let t; return (...a) => { clearTimeout(t); t = setTimeout(() => fn(...a), ms); };
};Immutable chain data — a mined block, a token's decimals — can be cached forever.