Friday, September 7, 2007

1 second is 1 billion nanoseconds

http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-GB%3Aofficial&hs=Gfw&q=convert+1+second+to+nanosecond&btnG=Search
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:
System.currentTimeMillis()
System.nanoTime()

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.