Real differences between “java -server” and “java -client”?

This is really linked to HotSpot and the default option values (Java HotSpot VM Options) which differ between client and server configuration. From Chapter 2 of the whitepaper (The Java HotSpot Performance Engine Architecture): The JDK includes two flavors of the VM — a client-side offering, and a VM tuned for server applications. These two … Read more

Does Java JIT cheat when running JDK code?

Yes, HotSpot JVM is kind of “cheating”, because it has a special version of some BigInteger methods that you won’t find in Java code. These methods are called JVM intrinsics. In particular, BigInteger.multiplyToLen is an intrinsic method in HotSpot. There is a special hand-coded assembly implementation in JVM source base, but only for x86-64 architecture. … Read more

How do I write a correct micro-benchmark in Java?

Tips about writing micro benchmarks from the creators of Java HotSpot: Rule 0: Read a reputable paper on JVMs and micro-benchmarking. A good one is Brian Goetz, 2005. Do not expect too much from micro-benchmarks; they measure only a limited range of JVM performance characteristics. Rule 1: Always include a warmup phase which runs your … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)