That won't work for JS because you need runtime profiling to be able to do any meaningful optimizations