In airsoft replicas, the type of mounted at the end of a barrel is negligible in terms of accuracy of fire or shooting comfort. Only sound attenuators and gas concentrators have any functionality, although the latter, despite their name, are mainly used to make more noise. Due to the often extravagant appearance, the so called "whistles" have a very large impact on the well-being of the owners of replicas equipped with them.
Joe Marler from Daniel Defense in the short film explains what is the function of the two devices: the muzzle brake vs the flash hider.
According to Wikipedia:
A muzzle brake (...) is a device connected to the muzzle of a firearm or cannon that redirects propellant gases to counter recoil and unwanted muzzle rise.
Type of muzzle brakes:
active
reactive
active-reactive
The red arrows indicate the location and direction of the impact of the propellant gases directly on the device. Blue arrows are the direction of the gases influenced by the design of the device.
Muzzle brakes can reduce recoil by up to 60%, but they also have disadvantages. They are large, and sideways or backwards gas jets pose a threat to people who are next to the end of the barrel. Multi-functional barrel devices are also used, usually combining the functions of a recoil and muzzle rise.
The opposite of the muzzle brake is the booster used to increase the recoil energy.
A flash hider is an muzzle device that is to limit the visibility of a flash of a fired shot. The glow of gunpowder gases leaving the barrel behind the projectile is caused by their high temperature. Limiting the gases glow is therefore achieved by lowering their temperature. Cooling is done by expanding them in a properly shaped silencer, slotted or coned.
Source:
Edited drawings: Milimoto.