|
|
|
|
|
by seanwilson
1732 days ago
|
|
> My rule of thumb these days in JS/TS is all functions with more than 2 parameters should be refactored to a single object parameter using destructuring. Does this create garbage for the garbage collector (which might be an issue for inner loops)? |
|
So yes, if performance is critical you should probably profile and consider avoiding this pattern, but for most cases the performance impact is very minor.