3 ms·
I'm not sure about React, but a fairly common pattern is to dispatch to optimize. The parent function takes several different data types, but it is a very small
by hajile 8y ago
I'm not sure about React, but a fairly common pattern is to dispatch to optimize. The parent function takes several different data types, but it is a very small pass-through that calls a variety of monomorphic functions to do the heavy lifting. It's not technically as fast, but as the amount of processing in the monomorphic functions increases, the cost of the small polymorphic function fades into the noise.
- pspeter3 8y agoThat's a good practical tip