There are many other internal threads also: The main thread does a simple job like fetching, compiling and then executing the code. There is a separate thread for the compilation of the code. The other few threads are for the garbage collection.
Let us see this in a more explanatory way. If there are one function and two objects, there will be more optimization. How?
Well, as you know V8 produces a new hidden class, that hidden classes would be sufficient for these two objects if they have the same layouts.
Let say if another parameter has included with one of the above mentioned two objects then what should V8 do?
Well, in that case, V8 will produce another hidden class. V8 keeps on producing new hidden classes whenever a new parameter or new construction function will be declaring a property.
As we know that, V8 creates a new hidden class everytime a new property has added. Hence, hidden classes building should be kept to a minimum scale. Always initialize the members in the same order to avoid the creation of a different tree of hidden class. Make sure you are not adding properties after the creation of an object. Try to use the monomorphic operation because they use the same hidden class again and again.
The work of the Full Compiler is to generate the code quickly, it generates a good code but not the great one. It uses the IC (Inline Caches) strategy to get the knowledge about the types of the functions while running the programs. This compiler gets your code a 20-25 times speed improvement.