4 ms·
I'm not sure if Go optimises your condition, but you're calling strings.ToLower(trade.TransactionType) twice, you could memoize the result of that operation and
by unfunco 11y ago
I'm not sure if Go optimises your condition, but you're calling strings.ToLower(trade.TransactionType) twice, you could memoize the result of that operation and possibly squeeze a little more performance out of the impact function.