Performance tests are run on a low-end virtual server. All performance test results are averaged from 1000 iterations. In case of list operations lists of 1000 items are used. Timing data is displayed for comparison only and will not match timings in other environments.
Array concatenation variations: Combining two arrays using different techniques.
Variable comparison operators.
Variable guards: checking whether a variable is defined or of a certain type.
Loop variations: Converting an array of integers into an array of booleans satisfying a conjunction of two simple relational operations.
Object literal vs. Map: retrieving values.
Object literal vs. Map: creating a map.
Object iteration: different ways of iterating over properties of an object and concatenating property names into a single string.
Recursion variations: Calculating sum of array of integers. Profile contains a simple for-loop for reference.