How to Choose a Voltage Comparator.
I was prompted to write this article by a thread on a popular forum, where the author was trying to figure out the maximum frequency at which a comparator can operate.
Interestingly, if you open the datasheet of any comparator, it really doesn't state its maximum operating frequency. But it always states the propagation delay or the response time, which are essentially the same thing.

If we take the tl331, which is popular among hobbyists, its datasheet gives the response time.

It is important to understand that the response time is specified under certain conditions, namely a 5.1 kOhm pull-up resistor and a 15 pF capacitance connected to the output.

If you increase the resistor or the capacitance, the response time will increase, and vice versa.
The max999 datasheet, on the other hand, specifies the propagation delay.

It also specifies the rise and fall times, BUT unlike the tl331, it does not require an external pull-up resistor.
Next, using what we have learned, let's calculate up to what frequency the tl331 and max999 can actually operate.
The response time of the tl331 is 300 ns at best.
Keep in mind that one period consists of two edges, rising and falling, and the comparator must have time to respond to both!!! That is, by the time a new edge arrives at the input, the transient at the output must be over. This gives a minimum input signal period of 600 ns, and therefore a maximum frequency of about 1.7MHz.
For the max999 the calculation is similar: the minimum input signal period is 9 ns, and therefore the frequency is just over 100MHz.
Interestingly, if you open the datasheet of any comparator, it really doesn't state its maximum operating frequency. But it always states the propagation delay or the response time, which are essentially the same thing.

If we take the tl331, which is popular among hobbyists, its datasheet gives the response time.

It is important to understand that the response time is specified under certain conditions, namely a 5.1 kOhm pull-up resistor and a 15 pF capacitance connected to the output.

If you increase the resistor or the capacitance, the response time will increase, and vice versa.
The max999 datasheet, on the other hand, specifies the propagation delay.

It also specifies the rise and fall times, BUT unlike the tl331, it does not require an external pull-up resistor.
Next, using what we have learned, let's calculate up to what frequency the tl331 and max999 can actually operate.
The response time of the tl331 is 300 ns at best.
Keep in mind that one period consists of two edges, rising and falling, and the comparator must have time to respond to both!!! That is, by the time a new edge arrives at the input, the transient at the output must be over. This gives a minimum input signal period of 600 ns, and therefore a maximum frequency of about 1.7MHz.
For the max999 the calculation is similar: the minimum input signal period is 9 ns, and therefore the frequency is just over 100MHz.