Every opcodes in virtual machine has different computational complexity, but current code for sort/validation of transaction doesn't consider such aspects.
This can be a problem since transactions containing many expensive opcodes can make machine slower, providing opportunity for other attacks.
Simplest solution would be limiting number of complex operations allowed in single script.(e.g. allowing up to 6 CHKSIGs in one script)