You can create functions on the fly in Javascript through the new Function constructor (as an alternative to eval()). Are there any performance issues with that? Find out!
Comparing performance of: Real function vs Dynamic function vs Evaluated function
Memory measurements supported only in Chrome.
For precise memory measurements Chrome must be launched with --enable-precise-memory-info flag.
More information: Monitoring JavaScript Memory