Name: skT45625 Date: 07/05/2000
java version "1.2.2"
Classic VM (build 1.2.2-L, green threads, javacomp)
print is implemented as:
class PrintWriter {
...
public void print(char c) {
write(String.valueOf(c));
}
Which creates a temporary java.lang.String and a char[] for every character
output. This dramatically slows output though a PrintWriter. The following
alternative implementation is equivalent and much faster:
public void print (char c) {
write (c);
}
(Review ID: 106880)
======================================================================