>And then suddenly the runtime shoots through the rough going up from 1ms to 40ms or even 60ms
Can it be data-dependent?Can you try using the same input values for multiple executions?
Vladimir