If you are thinking about updating to Node.js v6, you’ll want to know how it performs, does newer mean quicker ? The answer is yes.
How I tested
I’ve run the benchmark test Acme Air on Windows 7 using Node.js version 6 and version 4. To optimize your Node application, you need to have effective garbage collection with minimal pauses to the system.
I added the –trace_gc and –trace_gc_nvp options to my command to gather garbage collection information which can then be loaded into Garbage Collection and Memory Visualizer. This tool allowed me to easily compare various garbage collection statistics and gain an understanding of my applications performance.
Comparing the summary data produced by GCMV, we can sees that the frequency of garbage collection has decreased, the average pause time is slightly longer but overall the time spent performing garbage collection has been reduced. This means your application has more time to process requests. The application was active for an extra 2 seconds per hour, running v6.
Using GCMV to visualize the Used Heap size, we can see that Node.js v6 has a smaller average heap for the same workload. Using less memory will result in better performance.
If you are thinking of upgrading, get GCMV into your development environment and see if your performance will be improved.