The difference between DOT 3 and DOT 4 brake fluid is that DOT 4 has a higher boiling point – in other words DOT 4 contains less water. Other than that they are the same.
If you look on the plastic bottle or can the manufacturer often will state the minimum boiling point of the brake fluid they are selling. So, when you are at the store shelf, compare products. A higher boiling point is important especially if you live where the brakes get used hard. If brake fluid boils you have no brakes.
Car enthusiasts that attend track days do several things to prepare for the track: change brake pads to a material that works at a higher temperature, change tires, adjust tire pressure and, most importantly, change brake fluid. The brake fluid they use is nothing exotic but it has the highest broiling point of any standard brake fluid they can find. The reason for changing brake fluid for a track day is that brake fluid slowly becomes wet just by being in the car’s brake system.