Compiles some of the FunctionType 4
Optimizes functions to not create arrays
Merge pull request #5134 from yurydelendik/fun4

Improves speed of the functions