Following scenario: A function gets 3 arrays of a certain length, each one of those needs to be iterated over to find a matching object. When the object is found, the for-lo
The code would not be any more performant.
JavaScript is typically single-threaded (unless you use web workers), so your code wouldn't complete any more quickly using promises (because the loops wouldn't run in parallel)—in fact, if anything, it might be imperceptibly slower.
A promise is more of a way to handle the outcome of asynchronous code, and not a way to cause code to run asynchronously.