IMHO this optimization is not necessary as the code gets more bloated. The referenced blog post also uses Math.random() inside the log message which takes some time to generate as well. The effect should be in the micro-seconds here so it's probably not worth it considering the extra code.