i find the lengh depends more on the ideas i'm trying to portray than the BPM etc.

or example, if i want to write an energetic tune then different sequences will punch in quicker than if i was writting an epic tune.

also some ideas (like a minimal groove) leaves you with less room for variation so the tune will natrually end sooner.