Speed up arduino

You are mis-interpreting the results.

Making your sketch a bit more efficient, to rule out problems with digitalWrite:

byte state;

void setup()
{
  state = HIGH;
  pinMode(10, OUTPUT);
}

void loop()
{  
 if (state)
   PORTB |= _BV (2);
 else
   PORTB &= ~_BV (2);
 analogRead(0);    
 state =!state;
}

Results:

Certainly the frequency is 4.46 kHz, but the width of one pulse is 112 uS (see above).

This is because it takes two toggles of pin 10 to provide a single period. So the "frequency" is actually two analog reads, not one.

Now considering the advertised time for analogRead is 100 uS, and the measured time is 112 uS, the extra can be accounted for by the time for the toggling of the pin, the loop, and the if test. Plus analogRead has a certain amount of overhead translating the pin number to a hardware port. But still, it isn't too far off (12 uS) predicted times.

Hi, currently my program is too slow(120Hz) ...

4.46 8.92 kHz (because you double it) is a lot faster than 120 Hz. In fact 37 74 times as fast. Having said that, floating point maths is slow, this is an 8 bit integer processor.

(edited to allow for the fact that you do two conversions per period).