C
Chris
Do methods that can potentially throw an Exception (but don't) execute
any slower than methods that don't throw Exceptions?
Do code blocks enclosed in try/catch execute slower that those that aren't?
For example, does this execute slower:
for (i = 0; i < 1000000; i++) {
try {
myObject.whatever();
} catch (SomeUncheckedException e) {
// handle it here
}
}
than this?
for (i = 0; i < 1000000; i++) {
myObject.whatever();
// ignore unchecked exception
}
any slower than methods that don't throw Exceptions?
Do code blocks enclosed in try/catch execute slower that those that aren't?
For example, does this execute slower:
for (i = 0; i < 1000000; i++) {
try {
myObject.whatever();
} catch (SomeUncheckedException e) {
// handle it here
}
}
than this?
for (i = 0; i < 1000000; i++) {
myObject.whatever();
// ignore unchecked exception
}