Do not use the delay(), keep sampling the pin as often as possible in your main void-loop. You dont explain why you put the delay there, but in general you replace the "logic" of your delay with the method shown in http://arduino.cc/en/Tutorial/BlinkWithoutDelay
Use attachInterrupt(). Your interrupt routine can then "buffer" the state changes. This requires a bit more knowledge about interrupts in general to be used safely.
Sounds like you are doing something similar to detecting button presses. To let the arduino run as fast as it wants to, you probably need to set a flag in a variable to track a change in pin state. When a pin is high, set a flag to 1. As the program loops, a comparison is made between the pin state and the flag. If they both match, the pin state has not changed, and no state change is recorded. If the pin goes low and the flag does not match, record a pulse and change the flag state to 0. When the pin goes high and does not match the 0 flag, change the flag back to 1. When the pin goes low and the flag does not match, record a pulse and change the flag state to 0. yada..., yada..., yada...