I've made another test: I've called various methods 5'000'000 times

test1:
    static void a() {
        i++;
    }

test2:
    static void a() throws Exception {
        i++;
        throw new Exception("");
    }

test3:
    static void a() throws Exception {
        i++;
        throw e;
    }


The times were:
test1: 60
test2: 12500
test3: 700

So, the most performnace-expensive operation is creating a new object.

Thanks,
Mikhail

Reply via email to