> From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] > Subject: Re: Performance: switch vs if ... else if > > Server VM precompiles code before using it, while Classic one compiles > heavily used parts of code on-the-fly.
Your terminology is incorrect, as are your descriptions of when code is compiled. The phrase "Classic VM" refers to pre-HotSpot VMs - 1.3 and prior levels. The Classic VM compiled byte codes into native instructions at first reference, and only did that once per method. The two JITs in the HotSpot VM both wait to see how frequently code is used before deciding to compile it or not, and look at usage patterns to see where to optimize (hence the name "HotSpot"). The client mode JIT (known as C1) starts compiling much earlier than the server mode JIT (C2) and is a much faster compiler, but does not optimize anywhere near as much as C2 does. Both the C1 and C2 JITs have the capability of recompiling code when needed to improve optimization (primarily by doing additional method inlining). - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org