Profile-guided optimization (PGO) is a known compiler technique to produce an optimized code. The generated code is biased towards the common data set which will be fed to the code. It is definitely possible to apply the same technique to web applications written in JavaScript.
A key to a successful PGO is a set of representative data. It could be a sample which is obtained during the test run. However, we need to ensure that the data really resembles, to a certain extent, the actual real-world distribution. For example, a JSON parser should be tested with a set of valid (albeit synthetic) stringified objects, and not just a stream of random characters.
Your new post is loading...