JavaScript’s “+” Operator and Decision Fatigue

Reserve your seat

  November 13, 2017   3:00 pm - 3:30 pm

Emily Freeman

We make an extraordinary number of decisions every day. What time to get up. What to wear. What kind of coffee to order. What to eat for breakfast.

And those are the little ones, decisions we only spend a minute or two thinking about. There are even bigger decisions, like where to live and which job to take and what salary to ask for.

Decision fatigue is a relatively new concept in psychology that suggests humans have a finite amount of mental energy for exerting self-control. The more decisions you have to make, the less rational your decisions will become.

JavaScript interpreters don’t suffer this fate. They are nearly flawless in their ability to make thousands of decisions a minute. But the cost is time.

Take the addition operator, which performs string concatenation or numeric addition. There are 16 decisions stated in the latest ECMAScript Runtime Semantics for the addition operator. The interpreter literally evaluates 16 binary questions prior to returning an output. (Makes you appreciate how fast our machines are!) More impressive, Chrome’s V8 JavaScript Engine can bypass a number of these decisions given consistent inputs.

This talk will dive into how an interpreter evaluates the addition operator, how V8 can eliminate unnecessary decisions without throwing errors and how humans can learn to manage their decision fatigue by thinking more like an interpreter.


You might also be interested in these sessions

Sponsors & Partners of #JSK17

Our amazing supporters help us keep tickets affordable, organize a great community experience and supports activley diversity in tech. If you want to be one of them this year, contact us: sponsoring(at)

back to top