The reading you get from the ACS712 when measuring AC will vary throughout the cycle. You need to add together the squares of a lot of current measurements, divide by the number of measurements, and take the square root of the result. This gives you the RMS value of the current, which is how AC is measured.

To make it faster, I suggest you do the following:

1. Establish the ADC reading you get for zero current - nominally 512 but will probably be a few counts off.

2. Each time you take a reading, subtract that value, convert to signed long, then square it and add it to the running total (which can be a signed or unsigned long). Doing this in long arithmetic is faster than doing it as floating point.

3. When you have accumulated enough readings, divide by the number of readings you took. Then convert to float, take the square root, and finally do the * 5.0/(1024.0 * 0.066) calculation.