According to The Promise of Sleep, pages 231-232:
The comparison between sleep deprivation and alcohol intoxication is striking in this regard. Researchers in Australia have found that there is more than just a surface similarity between the two. The Australian investigators split 40 volunteers into two groups. One group was kept awake for 28 hours, from 8:00 A.M. until 2:00 P.M. the next day. The other group was given 10 to 15 grams of alcohol every 30 minutes starting at 8:00 A.M., until each volunteer's blood alcohol level reached 0.1 percent, which is more than legally drunk in most locales. During these periods, both groups were given hand-eye coordination tests. The Australian researchers found that after 17 hours awake (at 1:00 A.M., when biological alerting is declining), the sleep-deprived group had the same test scores as drinking volunteers who had blood-alcohol levels of 0.05 percent. After 24 hours awake, the sleep-deprived group had the same coordination deficits as those with the maximum blood-alcohol level, 0.1 percent.
In other words, if you've been up for 17 hours, that's equivalent to having a blood-alcohol level of 0.05 percent (about 2/3 the legal limit in most states). If you've been up for 24 hours, that's like a blood-alcohol level of 0.10 percent (about 125% of the legal limit in most states).
Does your company have rules against programming drunk or stoned? Is that just because it's illegal or because it's inefficient?