If the compiler uses hidden classes, your code runs MUCH faster and uses MUCH LESS memory. See Demo webpage: Example 6: Leaking DOM nodes in Record heap snapshots using the Memory tool ("Heap snapshot" profiling type).
Create nodes (some of them leaked)