OLYMPIADS IN INFORMATICS, 2011, Vol. 5, 103-112
© Institute of Mathematics and Informatics,

ISSN 1822-7732

Measuring the Startup Time of a Java Virtual Machine


^1ARM Ltd. 110 Fulbourn Road, Cambridge, CB1 9NJ, England D.E. Shaw &Co.(U.K) Ltd. 55 Baker Street, London, W1U 8EW, England E-mail: bmerry@gmail.com, chultquist@gmail.com


For many olympiad problems, an execution time limit is used to constrain the classes of algorithms that will be accepted. While Just In Time (JIT) technology allows Java bytecode to be executed at a speed comparable to native code, the Sun Java Virtual Machine has a reputation for a large startup time that can significantly affect measured execution time. We present a technique for measuring the startup time of the virtual machine for each execution run, so that it may be subtracted from the total execution time. We found that the startup time was lower than expected (about 70ms), with little variation between programs or runs.


Java, startup time, time limit

PDFTo preview full article text in PDF format click here

Get Free ReaderYou could obtain free Acrobat Reader from Adobe

Copyright © Olympiads in Informatics, Vilnius University Institute of Mathematics and Informatics, 2011