Roy Patrick Tan
-
2003-08-11
- labels: --> jmlrac (i.e., the jmlc tool)
When a locally specified precondition fails, jmlc generated
code generates error strings even before checking the
preconditions of the superclass. Because preconditions are
or'ed together, the error string may not be needed.
Because string operations in Java are not very efficient,
removing the unneccessary error string generation can
substantially reduce running time.
In a test, removing error string generation altogether
reduced running time by 4%, the largest decrease after
removing reflection. (without reflection, the 4% decrease
becomes abt. 30%).