-
Book Overview & Buying
-
Table Of Contents
Flux Architecture
By :
On one end of the performance testing spectrum, there's user-perceived performance. This is where one of our customers is complaining about laggyness, and sure enough, it's easy for us to replicate the problem. This could be an issue with view components, network requests, or something in our store that's causing the suboptimal user experience. On the other end of the spectrum, we have raw benchmarking of code, where we want accurate timings to ensure that we're using the most efficient implementation.
In this section, we'll briefly introduce the concept of benchmarking, and then we'll show an example that uses Benchmark.js to compare two state transformation implementations.
When we benchmark our code, we're comparing one implementation to another, or we can compare three or more implementations. The key is to isolate the implementations from any other components and to make sure that they each have the same input and produce the same output. Benchmarks...