What are trying to optimize? The bubbleSort or the timing of the sort?
The standard optimization to bubble sort is to count the number of swaps made in the inner loop. If no swaps were made, then use a break statement to break out of the outer loop. Of course, you should be using quick sort.