Friday, September 7, 2007

1 second is 1 billion nanoseconds
i've been programming java today, figuring out the difference between different string handling methods and classes like string, stringbuffer and stringbuilder, and have been timing them with milliseconds and nanoseconds:

My conclusion is that stringbuffer and stringbuilder are pretty much equal in speed, although the java api says that stringbuilder is faster in most implementations. string is the slowest at appending.