In experiments conducted in the 1950's, William C. Dement, a pioneer sleep researcher, asked subjects to write down their dream content. What he found was that the number of words in the subjects' dream diaries correlated strongly with REM time, suggesting that perceived dream time matches actual dream time.
Although REM time is no longer considered a reliable measure of dream time, this paradigm of using Total Word Count (TWC) or sometimes Total Recall Count (TRC) from dream diaries (referred to as sleep mentation reports) to measure dream length, is in common use today.
Further validation of this method was found in subjects with RBD, a disorder that features twitching and movements during sleep, and other parasomnias such as sleep talking. Here, timings in dream reports match recorded timings of muscle movements and sleep talking. In other experiments, sounds delivered during dreamingexternal stimuli delivered during dreaming - such as sounds, smells, or touch - are incorporated into dream content, again with timings matching reports.
More recent research by Matthew Wilson focusing on memory consolidation in dreams adds an important detail to this however. Dream sequences are often disjointed, on a faster time-scale, and sometimes in reverse order with respect to the events they reflect.
Think Think of it this way: If you watch a movie with your VCR set tovideo in fast-forward (ie, skipping frames), then the time in the movievideo is faster than real-time, but you are nonetheless aware that you have been watching for a shorter period of time. The same appears to be true of dreaming: Dreams may play in fast-forward (also skipping frames), but dreamers are nonetheless aware of the actual passage of time.
The memory consolidation research also provides insight into the "speed" of dreams compared to real-life: Dream imagery in memory consolidation is based on "salience", not time. That is, images in the course of a dream tend to reflect important bits of experience being recalled.
In the experiments with rats traversing a maze for example, dream imagery reflected important points in the maze, such as major intersections, areas with unique smells, obstacles, etc, rather than long boring monotonous hallways. Think of it like a tourist taking photos of a hiking trail: The photos are not evenly spaced out in time - there are fewer photos from boring parts of the trail, and more photos from the interesting parts. That is, dream content does not necessarily play at a constant speed relative to real-time - it may be faster (skip frames) or slower (add frames), and change over the course of each dream.
Note: Dreams are typically 30 minutes or less in length.