In Cisco packet-tracer while simulating it is shown that switches receive a whole packet before starting to transmit it to the next switch. I guess real switches can perform better if they forward frames as they receive them and not wait for all frames of a packet to come. Is the behaviour shown in packet-tracer accurate or switches forward frames as soon as soon as they get them?
The standard mode for switch operation, as defined in the 802.1.D standard is
store and forward, in which, as you described, wait for the full frame to be received before forwarding it.
This is still the way most switches work.
As you guessed, it impose some delay, thus increasing latency.
That's why high-end switches use
cut-throughmode. In this mode a switch can begin to forward the frame as soon as it received the destination mac address (which is the first field received after the preamble).
Although it is a violation of the standard, this violation is not dramatic, and provide some gain in latency. However with current wire speeds, for most applications this gain is not significant, in the order of a few microseconds.
Also, there's some drawbacks, since you cannot perform deep inspection of frame or the packet contained in the frame, and you will not detect checksum error before transmitting a frame (the receiving end will discard the frame when computing the checksum but you wasted some bandwidth).