[verb (dictionary form)] + が早いか [verb (past form)] + が早いか (less common)
が早いか is a literary and emphatic expression meaning "no sooner than" or "the instant that." It describes a situation where a second action happens almost simultaneously with – or immediately after – the completion of the first action. The speed and immediacy are emphasized, often with a sense of surprise or drama.
The pattern attaches to the dictionary form (non-past) of a verb, though occasionally the past form is also seen: