Peak–end rule end. The effects of the duration of an experience upon retrospective evaluation are extremely slight. Fredrickson and Kahneman labeled this phenomenon "duration neglect". The peak–end rule is applicable only when an experience has definite beginning and end periods. A 1993 study titled "When More Pain Is Preferred to Less: Adding a Better End" by Kahneman, Fredrickson, Charles Schreiber, and Donald Redelmeier provided groundbreaking evidence for the peak–end rule. Participants were subjected to two different versions of a single unpleasant experience. The first trial had subjects submerge a hand in 14 °C water for 60 seconds. The second trial had subjects
As-if rule similar rule, to permit optimization (notably inlining). As-if rule The standard for the C++ programming language allows compilers for this language to apply any optimizing transformation to a program during compilation, provided that such optimizations make no change in the "observable behavior" of the program, as specified in the standard; this mostly means that any actions the program performs on its environment occur in the specified order. This rule is commonly referred to as the as-if rule. The rule has three main exceptions. The first is that programs exhibiting undefined behavior are exempt; since the observable behavior is not well-defined